General > User modifications
UFO scripting: guide to changing scriptable parameters
xray:
--- Quote from: geever on May 10, 2014, 02:06:19 pm ---For such functionality you need to write a C callback now. :(
I would be happy to see such a foreach loop possibility in the UI Engine though. If you could implement it, I would be happy to add it to the codebase!
--- End quote ---
This at least confirms what I already guessed. Unfortunately I only recently started looking at the code base, so I guess it will be a while before I actually have something working.
Based on you mentioning the "UI engine", are you proposing a 'foreach' solution in the script language? Would it not be easier to implement an iterator node that iterates the children of a target node and executes a confunc? This way, if you need an iterator you create a hidden node (e.g. the data node) and use it.
cannonfodder558:
Hello.
I'd like shots of ep-rounds fired by Phalanx weaponry (the assault rifle, for a beginning) to have the neon blueish colour and aura (not shape) of shots from the alien plasma rifle in battlescape. 8)
Playing 2.5 stable on win 7 32 bit.
Could you please tell me where to find the values of the alien plasma rifle / colour of shots (if this involves only the colour? If not, I'd appreciate your hints), and the values of the assault rifle/ colour of shots of ep rounds?
And secondly of sniper rifle/ machine gun ep shots, too?
I don't mind if the colour can't be changed by ammotype. If not, I'd like to change the colour of shots in general. I won't use standard ammo any more.
I'd also appreciate you tell me in advance if the proposed change is possible, using the information provided here.
I've no clue of coding/ modelling. Hope it can be done by editing values in files with a text editor.
Thank you very much in advance.
ShipIt:
I think the /ufos/ptl_weaponsfx should be a good place to start.
ShipIt:
The ammo def describes what particle to use for it. The particle def describes what pic to use.
For the ep-rounds the ammo def can be found in /base/ufos/weapon_plasma.ufo line 372ff (2.6-dev that is) using the 'bullet' - particle (the same one as the normal ammo), which again is defined in /ufos/ptl_weaponsfx.ufo line 148ff using the image /base/pics/sfx/weapons/bullet1.
The way to go for you would be to make a copy of the particle bullet, naming it like 'bullet_ep', than change the ep ammo to use this particle instead of the normal one. In your new bullet_ep def changing the value of the 'image' parameter to "sfx/weapons/plasmapulse" should result in the assault rifle ep-rounds shown the same way as the plasma shots.
Edit: You might also want to adapt the ligtcolor and lightintensity parameters.
cannonfodder558:
Thanks a lot for your help, coming into this modding stuff.
It seems that the folder structure and file names are completly different in 2.5 stable.
But I'll try finding my way using this:
http://ufoai.org/wiki/UFO-Scripts
I'll sent pics if my soldiers suddenly have pointed triangular ears, three legs and a green skin ;)).
Have a nice day.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version