Hi all i'd like to add some new resources, and change metal and energy to different names too. is t possible? thanks in advance
-pow
New Resources
Moderator: Moderators
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: New Resources
Yes it's possible, you can do this with lua. But I think you'd have to reimplement all of the mechanics of resourcing yourself in lua if you want >2 resources.
Re: New Resources
I'm willing. Just tell me how to do it
Re: New Resources
"Lua it" means you have to write a gadget script (and possibly modify/add a few widgets).
1) Set a TeamRulesParam for each team ingame to store values for your custom resource.
2) Tap into AllowBuild / AllowBuildStep / other synced call-ins to block or slow down actions that consume this resource when they are insufficient.
3) Tap into other call-ins to increment/decrement resource values for relevant team when appropriate.
4) Create some way to represent this resource to a player. That is, write an user-interface Widget script.
---
When in doubt, google.
1) Set a TeamRulesParam for each team ingame to store values for your custom resource.
2) Tap into AllowBuild / AllowBuildStep / other synced call-ins to block or slow down actions that consume this resource when they are insufficient.
3) Tap into other call-ins to increment/decrement resource values for relevant team when appropriate.
4) Create some way to represent this resource to a player. That is, write an user-interface Widget script.
---
When in doubt, google.
Re: New Resources
Did you get familiar with spring/spring's scripting yet? If not, do that first; otherwise confusion. (just asking since it is your first post and question is so vague)
Without too much spring-specifiques, via scripts it is possible to:
-to spawn & destroy units
-allow or disallow unit creation
-keep track of data per player/team
-draw & write whatever you want onto the screen
Basically yes, possible. Detail question would be how much stuff you want to leave to engine or not. For example you could keep "normal" factories and like Anarchid wrote then "Tap into AllowBuild / AllowBuildStep" to make them behave your way. Or you can also re-create that logic in Lua, too.
Without too much spring-specifiques, via scripts it is possible to:
-to spawn & destroy units
-allow or disallow unit creation
-keep track of data per player/team
-draw & write whatever you want onto the screen
Basically yes, possible. Detail question would be how much stuff you want to leave to engine or not. For example you could keep "normal" factories and like Anarchid wrote then "Tap into AllowBuild / AllowBuildStep" to make them behave your way. Or you can also re-create that logic in Lua, too.
Re: New Resources
Well actually i am totally new to spring. I wanted to know if it was possible to do it. If not, then it is no good for me to learn spring. Now that i see its possible, ill learn it properly. thanks
-pow
-pow