[HELP] stuck in weapon modding... - Beginner

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Alphabreen
Posts: 8
Joined: Sat, 5. Jan 19, 01:49
x4

[HELP] stuck in weapon modding... - Beginner

Post by Alphabreen » Mon, 30. Dec 19, 00:11

Good evening,


i tried to modify the Beta 3.0 Argon Flak Turret. For this i followed this tutorial (viewtopic.php?f=181&t=402452).
I have to say, that i'm not very experienced in modding and never mod a X-Game before.

So i searched for the Bullet File of the Flak Turret - i changed the LIFETIME to increase the range, when this work i plan to reduce the damage to make it not overpowerd. But first increasing the range ...

I unpacked the X Files and searched for the Bullet file (bullet_gen_m_flak_01_mk1_macro.xml), there i changed the line: "<bullet speed="1500" lifetime="6" amount="1" barrelamount="1" timediff="0.1" angle="0.2" maxhits="1" ricochet="0" restitution="1" scale="0" attach="0" selfdestruct="1" />" with Notepad ++. For my understanding after the tutorial thread, if i increase the lifetime of the bullet the weapon range should increase...

I created a onw Mod folder in the Extension folder called : "Flak_Quad_Turbolaser_Turret"
Inside i copied and changed a content.xml file from a other mod (see below)

----content.xml----
<?xml version="1.0" encoding="utf-8"?>
<content id="QuadTurboLaser" name="QuadTurboLaser" description="Change Flak into QuadTurbolaser" author="Alpha" version="100" date="2019-12-27" save="0">
<text language="7" name="QuadTurboLaser" description="QuadTurboLaser" author="Alpha" />
<text language="33" name="QuadTurboLaser" description="QuadTurboLaser" author="Alpha" />
<text language="34" name="QuadTurboLaser" description="QuadTurboLaser" author="Alpha" />
<text language="39" name="QuadTurboLaser" description="QuadTurboLaser" author="Alpha" />
<text language="44" name="QuadTurboLaser" description="QuadTurboLaser" author="Alpha" />
<text language="49" name="QuadTurboLaser" description="QuadTurboLaser" author="Alpha" />
<text language="86" name="QuadTurboLaser" description="QuadTurboLaser" author="Alpha" />
<text language="88" name="QuadTurboLaser" description="QuadTurboLaser" author="Alpha" />
</content>
--------------------

than i placed the modified bullet...xml in my mod folder with the needed subfolders like the original fiels :"extensions\Flak_Quad_Turbolaser_Turret\assets\fx\weaponsFx\macros" die veränderte "bullet_gen_m_flak_01_mk1_macro.xml"

----bullet_gen_m_flak_01_mk1_macro.xml----
<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: Alexei (192.168.3.58) at 08.11.2019_12-31-47-->
<macros>
<macro name="bullet_gen_m_flak_01_mk1_macro" class="bullet">
<component ref="bullet_gen_m_flak_01_mk1" />
<properties>
<ammunition value="9" reload="5" />
<bullet speed="1200" lifetime="6" amount="1" barrelamount="1" timediff="0.1" angle="0.2" maxhits="1" ricochet="0" restitution="1" scale="0" attach="0" selfdestruct="1" />
<reload rate="5" />
<areadamage value="70" time="1" lifetime="1" />
<damage value="70" repair="0" />
<effects>
<impact ref="impact_gen_m_flak_01_mk1" />
<launch ref="muzzle_gen_m_flak_01_mk1" />
</effects>
<weapon system="turret_midrange" />
</properties>
</macro>
</macros>
--------------------

now i tested the stuff ingame - and nothing changed! i can activate and deactivate the mod but the change i did in the file is not ingame. Flak Turret still have 1km Range ...

Now the question to the cracks: what did i do wrong? what did i miss? do i have to convert the xml file before it shows up ingame?

i would be thankful for any idea.



Greetings
Alphabreen

ps.: my english is not the best, i know ;)
Last edited by Alphabreen on Mon, 30. Dec 19, 11:39, edited 1 time in total.

iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Re: [HELP] stuck in weapon modding... - Beginner

Post by iforgotmysocks » Mon, 30. Dec 19, 02:42

Overwrite your flak bullet macro file with this and try again.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<diff>
  <replace sel="//bullet/@lifetime">6</replace>
</diff>

Alphabreen
Posts: 8
Joined: Sat, 5. Jan 19, 01:49
x4

Re: [HELP] stuck in weapon modding... - Beginner

Post by Alphabreen » Mon, 30. Dec 19, 11:29

How do i do this? Should i delete all code in the bullet... .xml or do i have to put this code in a separat file?

Where do i have to place this replacement code?

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [HELP] stuck in weapon modding... - Beginner

Post by alexalsp » Mon, 30. Dec 19, 13:18

The file name must match the name of the file you want to make changes to.

bullet_gen_m_flak_01_mk1_macro.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<diff>
  <replace sel="//bullet/@lifetime">6</replace>
</diff>
Download any mod and see how it is done.

iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Re: [HELP] stuck in weapon modding... - Beginner

Post by iforgotmysocks » Mon, 30. Dec 19, 14:12

you can also check out some tutorials listed in the thread sections above.

viewtopic.php?t=354310

Alphabreen
Posts: 8
Joined: Sat, 5. Jan 19, 01:49
x4

Re: [HELP] stuck in weapon modding... - Beginner

Post by Alphabreen » Mon, 30. Dec 19, 21:55

@iforgotmysocks - it worked! i love u !

i read the tutorial you linked before, but dont understand it. now after your hint and a bit testing all work fine! big thank you!!!


@alexalsp - i love u too ! :)



another question where i cant find an answere: can i change the weapon (bullet) color? Arg, Tel, Par Pulseturrets are blue, the Xenon ones are red - i would like to change the Arg/Tel/Par to green if it is possible with xml editing, but i cant find the right file/place to edit. or do i have to make a new model for the bullet? cause that i cant do ...

iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Re: [HELP] stuck in weapon modding... - Beginner

Post by iforgotmysocks » Mon, 6. Jan 20, 01:06

You wil need to take a look at the bullet component file (\assets\fx\weaponFx), it's one directory level above the related bullet macro file. There you may find a reference to an effect contained in the libraries/material_library.xml. In there you may be able to adjust the color.

Post Reply

Return to “X4: Foundations - Scripts and Modding”