Suppose i'm making a mod, and all i need to do is add a single event and a function that handles it. Here is an example: i add a timer event and a function that gives the players power every time the timer ticks.
In the example, i've added the code to rules.slo. This means if rules.slo change, the mod will break.
Is it possible to just add an extra file, without replacing existing ones, to achieve what i want? If not, what is the safest way of doing what i want? (:
Add a single event. Best way?
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
-
milo christiansen
- Regular

- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: Add a single event. Best way?
The best thing to do is look for every wrf that includes rules.slo and add "givepower.slo" and "givepower.vlo" (or whatever name you used) in the right place.
I have no idea what wrf(s) you need but you could look in the addon.lev file for a clue if you don't feel like opening every one
Of course this leads to the problem of the wrf changing but I think that would be less common than a script change.
I have no idea what wrf(s) you need but you could look in the addon.lev file for a clue if you don't feel like opening every one
Of course this leads to the problem of the wrf changing but I think that would be less common than a script change.
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
-
Per
- Warzone 2100 Team Member

- Posts: 3780
- Joined: 03 Aug 2006, 19:39
Re: Add a single event. Best way?
rules.slo is not likely to change for 2.3; for master, things are likely to change and break massively anyway.
You can run additional scripts by listing them in a .wrf that is included by the map. I'm not sure how that works with the new mapmod stuff, though.
You can run additional scripts by listing them in a .wrf that is included by the map. I'm not sure how that works with the new mapmod stuff, though.
-
NoQ
- Special

- Posts: 6226
- Joined: 24 Dec 2009, 11:35
- Location: /var/zone
Re: Add a single event. Best way?
That's the way i did spectators on some of my maps, and it works. But i'm talking about standalone mods right now.Per wrote:You can run additional scripts by listing them in a .wrf that is included by the map. I'm not sure how that works with the new mapmod stuff, though.
oh well (:milo christiansen wrote:wrf
ok got it! (:Per wrote:rules.slo is not likely to change for 2.3
Ok, if wishes are still accepted for new modding technology, i'd really like an ability to add things without substituting things!Per wrote:for master, things are likely to change and break massively anyway.
Last edited by NoQ on 01 Sep 2011, 12:52, edited 1 time in total.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
-
Terminator
- Regular

- Posts: 1077
- Joined: 05 Aug 2006, 13:46
- Location: Ukraine
Re: Add a single event. Best way?
I just wanted to advice you to modify some wrf files that won't be changed in MP, its skirmish wrf files, "skirmish4.wrf" -its simple to add your own scrip files.
Death is the only way out... sh*t Happens !
Russian-speaking Social network Group http://vk.com/warzone2100
Russian-speaking Social network Group http://vk.com/warzone2100
-
Iluvalar
- Regular

- Posts: 1828
- Joined: 02 Oct 2010, 18:44
Re: Add a single event. Best way?
I agree with Per. If the game change so much that your rules.slo doesn't work anymore, You'll need to remake your mod anyway. The wrf version will have a maximal longevity but when I think about the extra effort you'll do for it or another "X-T1" mumbo-jumbo trick I know. You might be better just copy paste your event in rules.slo and repeat that when needed.
A better way would be to have the game load all a directory instead of cherry picked files. Then we could add a new event just like that...
A better way would be to have the game load all a directory instead of cherry picked files. Then we could add a new event just like that...
Heretic 2.3 improver and proud of it.