Giving metal with lua script?
Moderator: Moderators
Giving metal with lua script?
Is it possible to make lua script that gives you, for example 10k metal once at the start of the game? since TASClient doesnt support more than 10k m/e, so im thinking if i could override that with lua... and without making new mod/mutator...
Re: Giving metal with lua script?
err.. if you could do this in a widget, wouldn't that make it a little bit too easy to cheat? Caydr would die from rage.
Re: Giving metal with lua script?
Sure you can. LRN TO MOD OPTIONSTradeMark wrote:Is it possible to make lua script that gives you, for example 10k metal once at the start of the game? since TASClient doesnt support more than 10k m/e, so im thinking if i could override that with lua...
NOPETradeMark wrote:and without making new mod/mutator...
Re: Giving metal with lua script?
You can absolutely do this, and it doesn't take a mod option, just a simple Gadget to adjust your storage. However, it's still just a mutator-only option.
I adjust starting M/E in P.U.R.E., for example.
I adjust starting M/E in P.U.R.E., for example.
Re: Giving metal with lua script?
that would be a hard set value. It would be more flexible as a mod option.
Re: Giving metal with lua script?
Is there anyway to make where killing units can overall increase the economy a unit produces, like killing 20 units add 1 percent to overall energy and metal production.
If your team kills 100 units your commander gets a 5 percent bonus in <insert your thing here>
If your team kills 100 units your commander gets a 5 percent bonus in <insert your thing here>
Re: Giving metal with lua script?
S44 has this.smoth wrote:that would be a hard set value. It would be more flexible as a mod option.
Re: Giving metal with lua script?
I have to wonder why such things are even part of the Lobby interface and not just covered by mod options. Funny how that backwards shit can cause such issues.FLOZi wrote:S44 has this.
Re: Giving metal with lua script?
I tend to agree.smoth wrote:I have to wonder why such things are even part of the Lobby interface and not just covered by mod options. Funny how that backwards shit can cause such issues.FLOZi wrote:S44 has this.
Re: Giving metal with lua script?
hmm, so i need mutator...
would it be then possible to make a map which has gadget that spawns each player 1 unit which generates 10k metal per second, and then selfdes it right after you got the metal?
i would change commander metal storage to 20k for example...
would it be then possible to make a map which has gadget that spawns each player 1 unit which generates 10k metal per second, and then selfdes it right after you got the metal?
i would change commander metal storage to 20k for example...
Re: Giving metal with lua script?
You could just make a map with a gadget that does nothing but give you 10k metal on the start.
Re: Giving metal with lua script?
anything you can do in a mutator you can do in a map right? (cause you could just put the whole mod in a map)
except modoptions maybe...
except modoptions maybe...
Re: Giving metal with lua script?
Learn the difference between Lua gadget and Lua widget.momfreeek wrote:err.. if you could do this in a widget, wouldn't that make it a little bit too easy to cheat? Caydr would die from rage.
MapOptions.luamomfreeek wrote:except modoptions maybe...
Re: Giving metal with lua script?
He was asking for a way to do it with lua but 'without making new mod/mutator'. That pretty much = widget doesn't it? (Apart from including a gadget in a map)zwzsg wrote:Learn the difference between Lua gadget and Lua widget.momfreeek wrote:err.. if you could do this in a widget, wouldn't that make it a little bit too easy to cheat? Caydr would die from rage.
Check the context before you jump to conclusions about what someone said.
Re: Giving metal with lua script?
TradeMark is known for making rehashes of maps named "Speed Balls" with free fusion. So it's easy to guess that the context is, for new maps he's making. And map can use gadgets.
Re: Giving metal with lua script?
You can't do it with a Widget.
Re: Giving metal with lua script?
This should have been so obvious that we wouldn't have to discuss it.
Re: Giving metal with lua script?
This was less than obvious to me. He didn't say anything about maps.zwzsg wrote:TradeMark is known for making rehashes of maps named "Speed Balls" with free fusion. So it's easy to guess that the context is, for new maps he's making. And map can use gadgets.
Re: Giving metal with lua script?
Yeah, yeah. I guess it isn't totally obvious.
Basically, guys... Widgets aren't allowed to alter gamestate. Read it, yeah. Do funny things with OpenGL to react to what data they read, sure. Write? No. Get it?
If you want to write it, you need a Gadget, or a modOption, which is effectively the same thing, only it's more fun for end-users.
If it's a modOption, don't stick it into a map, unless you only want it played with one mod, because it will probably break other mods (IIRC, there isn't a good way to insert a modOption into that table, but I may be totally wrong). Otherwise, use a Gadget. Then you'll just break mods that also do this kind of thing.
Basically, guys... Widgets aren't allowed to alter gamestate. Read it, yeah. Do funny things with OpenGL to react to what data they read, sure. Write? No. Get it?
If you want to write it, you need a Gadget, or a modOption, which is effectively the same thing, only it's more fun for end-users.
If it's a modOption, don't stick it into a map, unless you only want it played with one mod, because it will probably break other mods (IIRC, there isn't a good way to insert a modOption into that table, but I may be totally wrong). Otherwise, use a Gadget. Then you'll just break mods that also do this kind of thing.
Re: Giving metal with lua script?
I know:
widgets are unsynced
gadgets are synced/unsynced
what you can do in unsynced code is necessarily restricted
meh, i was really just a joke anyway. I just imagined Caydrs reaction if it was possible in a widget :p
widgets are unsynced
gadgets are synced/unsynced
what you can do in unsynced code is necessarily restricted
meh, i was really just a joke anyway. I just imagined Caydrs reaction if it was possible in a widget :p