Ok, I'm starting to notice that quite a bit of stuff does happen in the span of 10 years ...
I'd like to make a mock up for a game concept I have. I want fixed /discrete income (+spending) (ie like in C&C or Starcraft, not continous income as is default in the Spring Engine).
iirc, Gundam had this, so I would have used that, but Smoth seems to have retracted the game (and I don't wager there is a GadgetDB anywhere in use).
Anyone know if any other game had this? I thought Evolution RTS maybe, but I was wrong there. Conflict Terra or The Cursed maybe?
Regards, Sean
P.S. If I want to move forward I probably need to build up on it so much I could implement it from scratch of course, but for a mock-up it would be nice to just reuse something :) !
LuaGadgets for discrete income economy ? (I think Gundam had?)
Moderator: Moderators
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: LuaGadgets for discrete income economy ? (I think Gundam had?)
This is pretty easy to do but involves a few steps and systems (command handling, resources, etc...). Most of the steps are pretty generic so exist in a few games already. I don't have time to lay out all the steps now though. A discussion seems easier. The most active place for stuff like this is probably #modding on the ZK discord. It is bridged to the ZK server too. If you ask around there you should find people to provide guidance, and I'm likely to comment on things too.
Re: LuaGadgets for discrete income economy ? (I think Gundam had?)
Thanks Google-Frog :).
I will be landing at the Zero-K Modder's scene I guess (certainly sounds like a good idea), as soon as I start rolling on this.
Still would have been nice to have something working just to do some trial runs :). I guess I'll try to ask Smoth.
I will be landing at the Zero-K Modder's scene I guess (certainly sounds like a good idea), as soon as I start rolling on this.
Still would have been nice to have something working just to do some trial runs :). I guess I'll try to ask Smoth.
Re: LuaGadgets for discrete income economy ? (I think Gundam had?)
Looks like Confict Terra had this:
https://github.com/spring-archive/confl ... mining.lua
Though getting that to run (even on the engine it was intended to run with) will be a challenge in and of itself .
Guess I'll just go with continous resources for the mockup (maybe insta-build, and paralyse for the duration till its supposed to be "done". Lets see ).
https://github.com/spring-archive/confl ... mining.lua
Though getting that to run (even on the engine it was intended to run with) will be a challenge in and of itself .
Guess I'll just go with continous resources for the mockup (maybe insta-build, and paralyse for the duration till its supposed to be "done". Lets see ).
Re: LuaGadgets for discrete income economy ? (I think Gundam had?)
You could make everything cost 0, and just tie the start of construction to allowcommand, would probably be less hacky than paralyze, and youd get all the advantages of stuff under construction
Re: LuaGadgets for discrete income economy ? (I think Gundam had?)
Thanks for the pointer. I'll look into it :) !
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: LuaGadgets for discrete income economy ? (I think Gundam had?)
Yes, something like AllowCommand is part of it.
I think Beherith is suggesting:
If I were to make a Starcraft production system I'd probably barely use the engine. Starcraft production is just such a straightforward algorithm. There isn't any heavy lifting to send to Spring.
I think Beherith is suggesting:
- Give units zero energy and metal cost.
- Subtract the unit cost on AllowCommand, if the resources exist, otherwise don't allow the command.
- Use Spring's nanoframe construction system.
- Give refunds if the unit is cancelled.
If I were to make a Starcraft production system I'd probably barely use the engine. Starcraft production is just such a straightforward algorithm. There isn't any heavy lifting to send to Spring.
- Use AllowCommand to detect commands sent to the factory.
- Use GameFrame to update the status of the factory.
- There is a callout to use resources, and to attempt to use resources and return whether they were used successfully. But resources are just a number that can easily be reimplemented if all you want is a Starcraft system.
- Use the callout CreateUnit to create units as appropriate.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: LuaGadgets for discrete income economy ? (I think Gundam had?)
Yes, something like AllowCommand is part of it.
I think Beherith is suggesting:
If I were to make a Starcraft production system I'd probably barely use the engine. Starcraft production is just such a straightforward algorithm. There isn't any heavy lifting to send to Spring. This isn't code golf, ie, I wouldn't approach this problem with the mindset of using inbuilt Spring things as much as possible. A whole Starcraft economy seems pretty simple to write and light to run. It would look like this:
I think Beherith is suggesting:
- Give units zero energy and metal cost.
- Subtract the unit cost on AllowCommand, if the resources exist, otherwise don't allow the command.
- Use Spring's nanoframe construction system.
- Give refunds if the unit is cancelled.
If I were to make a Starcraft production system I'd probably barely use the engine. Starcraft production is just such a straightforward algorithm. There isn't any heavy lifting to send to Spring. This isn't code golf, ie, I wouldn't approach this problem with the mindset of using inbuilt Spring things as much as possible. A whole Starcraft economy seems pretty simple to write and light to run. It would look like this:
- Use AllowCommand to detect commands sent to the factory.
- Use GameFrame to update the status of the factory.
- There is a callout to use resources, and to attempt to use resources and return whether they were used successfully. But resources are just a number that can easily be reimplemented if all you want is a Starcraft system.
- Use the callout CreateUnit to create units as appropriate.
Re: LuaGadgets for discrete income economy ? (I think Gundam had?)
For the ghosts of christmas yet to come:
MCL has a discrete implementation, after a kind, hacked into metal and energy.
https://github.com/SpringMCLegacy/Sprin ... income.lua
Deals with income, mostly through killing and damaging enemy units, as well as 'insurance' payouts for losing your own.
https://github.com/SpringMCLegacy/Sprin ... tposts.lua
Controls purchasing of 'base' buildings
https://github.com/SpringMCLegacy/Sprin ... pships.lua
Actually spawns and controls the ships that deliver all base buildings and combat units.
https://github.com/SpringMCLegacy/Sprin ... opZone.lua
Controls the actual purchasing of units.
It is indeed all done mostly in AllowCommand and CommandFallback callins.
MCL has a discrete implementation, after a kind, hacked into metal and energy.
https://github.com/SpringMCLegacy/Sprin ... income.lua
Deals with income, mostly through killing and damaging enemy units, as well as 'insurance' payouts for losing your own.
https://github.com/SpringMCLegacy/Sprin ... tposts.lua
Controls purchasing of 'base' buildings
https://github.com/SpringMCLegacy/Sprin ... pships.lua
Actually spawns and controls the ships that deliver all base buildings and combat units.
https://github.com/SpringMCLegacy/Sprin ... opZone.lua
Controls the actual purchasing of units.
It is indeed all done mostly in AllowCommand and CommandFallback callins.
Re: LuaGadgets for discrete income economy ? (I think Gundam had?)
Nice :)!
Wasn't expecting anything on this front anymore .
For one of the two factions, I want "ship" (actually plane / Airdrop) delivery anyhow, so this sounds perfect!
Wasn't expecting anything on this front anymore .
For one of the two factions, I want "ship" (actually plane / Airdrop) delivery anyhow, so this sounds perfect!