Modifying mouvement costs (and other things)
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Modifying mouvement costs (and other things)
After developing many scenarios and campaigns (some of them are published as UMC already), I noticed that the game coding will probably be much easier if :
1) altering the movement cost by both editor group alias (forest, flat, ...) and terrain type (Gs, ..).
2) to make it possible to track all tags (sound source, ...) by inspection (as inspection show for variables and stats,
3) to make it possible to clear are variables by a simple macro like (clear_variables all).
.
I don't know how much is it possible
1) altering the movement cost by both editor group alias (forest, flat, ...) and terrain type (Gs, ..).
2) to make it possible to track all tags (sound source, ...) by inspection (as inspection show for variables and stats,
3) to make it possible to clear are variables by a simple macro like (clear_variables all).
.
I don't know how much is it possible
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
- Pentarctagon
- Project Manager
- Posts: 5599
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Modifying mouvement costs (and other things)
Clearing *all* variables is a very destructive thing and would likely break all sorts of content that's relying on variables existing.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Modifying mouvement costs (and other things)
If you want however you can put all the variables you use in a container, this is easily done by prefixing all your variables with for example
her.
like her.my_variable
, then you can just delete the container her
{CLEAR_VARIABLE her}Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: Modifying mouvement costs (and other things)
That's a brilliant idea. I have to try it
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: Modifying mouvement costs (and other things)
You are right but I mean variables added by me not those already configured by the enginePentarctagon wrote: ↑March 16th, 2023, 2:03 am Clearing *all* variables is a very destructive thing and would likely break all sorts of content that's relying on variables existing.
And the other two propositions? Are they worthy? Are they possible, impossible or hard to achieve?
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
- Pentarctagon
- Project Manager
- Posts: 5599
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Modifying mouvement costs (and other things)
For (1): is this not already possible? Filtering on terrain codes allows for partial matches.
For (2): I'm not really sure what's being suggested.
For (2): I'm not really sure what's being suggested.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: Modifying mouvement costs (and other things)
1) I mean the mouvement_type tag. I think it only accept groups of terrain, not id of a specific terrain_typePentarctagon wrote: ↑March 16th, 2023, 4:40 am For (1): is this not already possible? Filtering on terrain codes allows for partial matches.
For (2): I'm not really sure what's being suggested.
2) I mean when you enter inspect mode, some information are inaccessible such as sound source
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
- Pentarctagon
- Project Manager
- Posts: 5599
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Modifying mouvement costs (and other things)
For (1): that sounds like it'd result in game play being significantly more complex since there would be a lot more movement cost variations.
For (2): isn't that already available just by looking into your code though?
For (2): isn't that already available just by looking into your code though?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: Modifying mouvement costs (and other things)
I know but also it give the developer more options regarding the movements . For example, certain units will be able to move fast in certain castles but not ruined or snowed ones, ...Pentarctagon wrote: ↑March 16th, 2023, 3:02 pm For (1): that sounds like it'd result in game play being significantly more complex since there would be a lot more movement cost variations.
It can be added as another tag or an optional sub-tag
Many tags are related to variables and not clear if the value of the variable is what you are excepting.For (2): isn't that already available just by looking into your code though?
In my case, for example, when I want to use a [sound_source] inside [random_placements], the variable $random_placement must be cleared and so you cant found it in the --inspect (if you didn't clear it, you will finish by storing all the map) . In this case, [sound_source] can't be inspected since it's $loc is cleared.
It will be very useful if their is a window for the active tags (just like) events
(I don't know if my english is able to explain what I am thinking. loool)
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
- Pentarctagon
- Project Manager
- Posts: 5599
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Modifying mouvement costs (and other things)
I don't think (2) is really possible, since there aren't really "active" tags.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Modifying mouvement costs (and other things)
(1) is also solution for https://github.com/wesnoth/wesnoth/issues/4831
(3) is possible by iterating wml.variables to remove WML variables and _G to remove Lua variables. And as mentioned before, do not do that.
(2) you could try check if savefile contains the information you need.
(3) is possible by iterating wml.variables to remove WML variables and _G to remove Lua variables. And as mentioned before, do not do that.
(2) you could try check if savefile contains the information you need.