How to create a user_script_X.lvl file?
Moderator: Moderators
-
- Recruit Womprat Killer
- Posts: 14
- Joined: Fri Apr 24, 2020 6:01 am
- Location: Spain
How to create a user_script_X.lvl file?
.
Last edited by gtgamtemp on Thu Jan 28, 2021 7:17 am, edited 1 time in total.
-
- Private Recruit
- Posts: 25
- Joined: Mon May 18, 2020 11:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: How to create a user_script_X.lvl file?
There's a ton of scripting tutorials listed in the FAQ thread. Are those of help or do they fall short?
I have no knowledge of scripting, but might be able to dig up something if you can provide me with more information.
I have no knowledge of scripting, but might be able to dig up something if you can provide me with more information.
-
- Recruit Womprat Killer
- Posts: 14
- Joined: Fri Apr 24, 2020 6:01 am
- Location: Spain
Re: How to create a user_script_X.lvl file?
.
Last edited by gtgamtemp on Thu Jan 28, 2021 7:17 am, edited 1 time in total.
-
- Corporal
- Posts: 151
- Joined: Thu Jan 24, 2019 11:02 pm
- Projects :: No Mod project currently
- xbox live or psn: No gamertag set
Re: How to create a user_script_X.lvl file?
The best tutorial type thing on this is probably Zerted's documentation for the 1.3 patch. They're buried in the patch folder (in the addon folder). Look at how to 'munge a custom lvl file' then how to 'make a custom user script' in that order.
Edit: Writing lua for the actual skin changer to work will take some more figuring out though. I don't know the easiest way to do it. I can think of a very convoluted method: Hack/redefine the AddUnitClass() function and the ReadDataFile() function so you can mess with them in the user script. Then add all the units with the new skins in a side mod (swapping the unit names around with the user script). But there must be another way of doing it because I've played someone else's skin changer mod before and they managed to use the fake console to swap skins after the game had already started (which I don't know how to do).
Edit: Writing lua for the actual skin changer to work will take some more figuring out though. I don't know the easiest way to do it. I can think of a very convoluted method: Hack/redefine the AddUnitClass() function and the ReadDataFile() function so you can mess with them in the user script. Then add all the units with the new skins in a side mod (swapping the unit names around with the user script). But there must be another way of doing it because I've played someone else's skin changer mod before and they managed to use the fake console to swap skins after the game had already started (which I don't know how to do).
Last edited by Sporadia on Sun Aug 09, 2020 9:53 am, edited 1 time in total.
-
- Recruit Womprat Killer
- Posts: 14
- Joined: Fri Apr 24, 2020 6:01 am
- Location: Spain
Re: How to create a user_script_X.lvl file?
.
Last edited by gtgamtemp on Thu Jan 28, 2021 7:17 am, edited 1 time in total.
- AnthonyBF2
- Sith
- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: How to create a user_script_X.lvl file?
The 1.3 patch comes with the documentation to do this. Look in the AAA-V1.3 addon folders.