Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

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

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

fergrim420
Posts: 81
Joined: Sun, 29. Nov 09, 03:07
x3

Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by fergrim420 »

So i found myself embarking on a search for knowledge and new experiences, and got myself waist deep into trying to create a new torpedo/missile type for my first foray into modding.

The torp shows up in the encyclopedia along with its stats, it's available to purchase from any given equipment dock or shipyard, and it costs what I intended for it to cost and uses the materials I intended for it to use.

So I was pretty proud of myself at that point, but then I buy myself a few and lo and behold, when they are fired rather than impacting the target, they simply disappear :( No damage, no boom, nothing.

I'm super new to github but i set up this impromptu repository in case anyone prefers to review the files that way.

https://github.com/fergrim/fergrim

generically named 'my mod'.

I've been at this for over 12 hours now and I no longer need to figure it out for myself, I'd just give anything for someone to show me where I've gone wrong.

Thanks so much,

Fergrim
teleportationwars
Posts: 158
Joined: Fri, 12. Jul 19, 14:03

Re: Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by teleportationwars »

you are missing an index entry for your explosion macro. it should be erroring in the log.
fergrim420
Posts: 81
Joined: Sun, 29. Nov 09, 03:07
x3

Re: Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by fergrim420 »

i love you deeply.

now i will go see about adding that and see if I have any luck.

Every last step of this process is new to me, I just started even trying to learn about 12 hours ago, so I was just assuming the issue was something much deeper and more confusing
fergrim420
Posts: 81
Joined: Sun, 29. Nov 09, 03:07
x3

Re: Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by fergrim420 »

Okay so i THOUGHT i followed your advice, would you mind taking another look?

I reuploaded the result, but I had the same thing happen where everything looks good, then I go to use it and it does nothing.

My explosion effect is borrowing the the geometry from the normal heavy missile explosion, I've just tweaked the surrounding the parameters. Not sure if that's it, or if I just failed to implement your suggested fix correctly.

I added an entry for the explosion in index/components.xml

Oh..and my library/effects.xml did not have <diff> and <add> tags. I added those.

My sounds library was improperly saved..

Jeeze, that's embarassing. And yet even after fixing all of those, I am not confident I have it figured out yet. But i'll upload where I'm at anyway.
teleportationwars
Posts: 158
Joined: Fri, 12. Jul 19, 14:03

Re: Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by teleportationwars »

every macro or component must have a reference in the index. missile_impact_01_antimatter_macro is missing such a reference. you will see the associated errors for your missing macro and component references if you setup the debuglog as instructed here: viewtopic.php?f=181&t=402452

you might be better off asking in the unofficial egosoft discord for help https://discord.gg/AWNAKU9
fergrim420
Posts: 81
Joined: Sun, 29. Nov 09, 03:07
x3

Re: Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by fergrim420 »

I went ahead and did as instructed with the debug, and I fixed every error it griped about. It was really useful, thanks :)

Unfortunately, I still am having the same result :( Damn things are made of cardboard, they buy, they launch, they fly, but they don't boom.

it's literally breaking my brain. I'm generally pretty good with this stuff.
ALEX Bemelmans
Posts: 59
Joined: Wed, 23. Nov 05, 17:07
x3

Re: Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by ALEX Bemelmans »

hi !
i look at your mod and i saw some missing stuffs and errors

1-in assets\fx\explosioneffects\

there is no MISSILE_IMPACT_01_ANTIMATTER_DATA.ANI
copy MISSILE_IMPACT_01_HEAVY_DATA.ANI from your extracted x4 paste in your assets\fx\explosioneffects\ and rename it like i said
(but you don t need the data folder)

2- there is an error in folder naming:
assets\props\WeaponSystems\missiles\ --> assets\props\WeaponSystems\missile\
no "s" to missile (like in your components.xml and X4 game folder)

3-so in macros.xml
remove the s to the missile folder

4- assets\props\WeaponSystems\missile\ there is a missing file
MISSILE_TORPEDO_ANTIMATTER_MK1_DATA.ANI
copy assets\props\WeaponSystems\missile\MISSILE_TORPEDO_HEAVY_MK1_DATA.ANI from your extracted x4 and paste in your assets\props\WeaponSystems\missile\ and rename it it like i said


there is maybe others errors that i don t see but i hope this helped you
(i don t know how work sound_library.xml and effects.xml...)
Last edited by ALEX Bemelmans on Sat, 25. Apr 20, 22:16, edited 3 times in total.
my textid range: 909700-909799
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by DeadAirRT »

Don't forget lower case file and folder names for the linux people.
ALEX Bemelmans
Posts: 59
Joined: Wed, 23. Nov 05, 17:07
x3

Re: Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by ALEX Bemelmans »

DeadAirRT wrote: Sat, 25. Apr 20, 20:21 Don't forget lower case file and folder names for the linux people.
linux is case sentitive so why lowering everything? THAT not equal that or That in linux but it is equivalent in windows

for exemple

Code: Select all

<components>
	<component name="missile_dumbfire_light_mk1" class="missile">
		<source geometry="assets\props\WeaponSystems\missile\missile_dumbfire_light_mk1_data"/>
		
if you name the folder weaponsystems and not WeaponSystems linux will not find the folder but windows will

.ANI files are in capital

is egosoft rewrited every .xml , .ANI and folders in minus for linux ?
my textid range: 909700-909799
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by DeadAirRT »

ALEX Bemelmans wrote: Sat, 25. Apr 20, 22:03
DeadAirRT wrote: Sat, 25. Apr 20, 20:21 Don't forget lower case file and folder names for the linux people.
linux is case sentitive so why lowering everything? THAT not equal that or That in linux but it is equivalent in windows

for exemple

Code: Select all

<components>
	<component name="missile_dumbfire_light_mk1" class="missile">
		<source geometry="assets\props\WeaponSystems\missile\missile_dumbfire_light_mk1_data"/>
		
if you name the folder weaponsystems and not WeaponSystems linux will not find the folder but windows will

.ANI files are in capital

is egosoft rewrited every .xml , .ANI and folders in minus for linux ?
Sorry, looks like they didn't completely finish the job for assets. You are correct on the folder, I thought they actually renamed them all like they did (most?) of their files.
ALEX Bemelmans
Posts: 59
Joined: Wed, 23. Nov 05, 17:07
x3

Re: Would someone familiar with modding/adding new weapons please help me? I'm desperate at this point

Post by ALEX Bemelmans »

DeadAirRT wrote: Sat, 25. Apr 20, 23:20
Sorry, looks like they didn't completely finish the job for assets. You are correct on the folder, I thought they actually renamed them all like they did (most?) of their files.
no it s only a little incomplete part of code to show you the path but i m not under linux version....

i found the information about the lowercase: the changes are in cutscene, ui and md folder
my textid range: 909700-909799

Return to “X4: Foundations - Scripts and Modding”