View Full Version : Active script embedding?
Slamoid
13th Oct 03, 1:20 PM
Is there any way to put in a script into a ship/level .LUA or Event file? If so, that would open up a whole new level of modding... New event types, leveling up Hero ships, orbiting asteroids that do damage to player ships, things like that. It would add a whole new dimension of modding.
Is there any way of occomplishing somthing like this, or at least simulating the effect?
P.S.: Please pardon my n00bage.:meh:
Bakuras
13th Oct 03, 1:34 PM
Mecha showed us how to put a clock in-game, but unfortunately that was likely already part of the code in some fashion. From what Relic has told us, it would seem that we won't be able to do code mods. Thus, as I understand it, no dice :(
Code mods would be very nice indeed at this stage. I wonder what the reasons were for them deciding against it? Complications with the game's engine? Piracy concerns? Doubtless it's a good reason none the less.
chami
13th Oct 03, 4:25 PM
It's probably just to protect their copyright interests (For now)...
Thought
13th Oct 03, 6:02 PM
Originally posted by Slamoid
Is there any way to put in a script into a ship/level .LUA or Event file? If so, that would open up a whole new level of modding... New event types, leveling up Hero ships, orbiting asteroids that do damage to player ships, things like that. It would add a whole new dimension of modding.
Is there any way of occomplishing somthing like this, or at least simulating the effect?
P.S.: Please pardon my n00bage.:meh:
No, but you can spawn specific ships into a level.
Thought
13th Oct 03, 6:03 PM
Originally posted by Bakuras
Mecha showed us how to put a clock in-game, but unfortunately that was likely already part of the code in some fashion. From what Relic has told us, it would seem that we won't be able to do code mods. Thus, as I understand it, no dice :(
Code mods would be very nice indeed at this stage. I wonder what the reasons were for them deciding against it? Complications with the game's engine? Piracy concerns? Doubtless it's a good reason none the less.
Not hardcoded, just making use of Homeworld 2 specific Lua functions.
bobthedog
13th Oct 03, 8:56 PM
what other things can be done with an autoexec.lua file?
IcePirate
13th Oct 03, 9:47 PM
just a pointer. Danwitt figured out how to use some Lua functionality to generate resources in the .level file using if/do statements. There is speculation that this could mean realtime random map generation or such. link (http://forums.relicnews.com/showthread.php?s=&threadid=19265)
We're just seeing the tip of the iceberg o the possibilities with the scripting, I think.
Bakuras
14th Oct 03, 4:35 AM
This is great news! If you're right, we can introduce all kinds of variables into the game! Everything from dictating when units retreat to automatic use of abilities :)
Ycar
25th Oct 03, 10:05 AM
Originally posted by Bakuras
Mecha showed us how to put a clock in-game...
Where can i get it please?
Thx
nickersonm
25th Oct 03, 4:04 PM
Ycar: search for "game timer" and you should find it.
Script functions can be added to level type files. Simply add a Rule (http://hw2.tproc.org/wiki/FunctionRule_Add) or a Interval Rule (http://hw2.tproc.org/wiki/FunctionRule_AddInterval) that points to a function. It will then execute the function repeatedly.
- nickersonm
0ctothorpe
31st Oct 03, 7:36 AM
Does the interval timer actually work ?
nickersonm
1st Nov 03, 12:41 AM
Yes, it works perfectly for me :). That's also what the timer script is based on. Simply call Rule_AddInterval("function_name_to_execute",interval) where interval is an integer.
- nickersonm
vBulletin v3.0.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.