"What advances to the unit" -tags

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

jg
Posts: 244
Joined: September 12th, 2005, 7:17 am

"What advances to the unit" -tags

Post by jg »

Would people appreciate if I would make "which unit advances to this unit" -tags (or similar) into the Help section in-game?

If, then I would try and get it ready before the Devs release 1.2.0, though if this has been implemented already (in the SNV version), then of course I won't do it... :P

jg

P.S: Didn't really think it would go into the Developer's discussion because I'm not one! :wink:
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Post by Boucman »

moved to coder's corner

this sounds like a good idea, and submiting patch is the best way to become a dev :)

AFAIK this has not been implemented in 1.3

and it won't be implemented in 1.2...

sorry, but we are in very deep code freeze right now and no more feature will make it in 1.2 only bugfixes....

but I'm perfectly fine with merging that type of patches in 1.3 so feel free to code it :)
Fight key loggers: write some perl using vim
SkeletonCrew
Inactive Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Post by SkeletonCrew »

I also would like to have this feature.
jg
Posts: 244
Joined: September 12th, 2005, 7:17 am

Post by jg »

Ok, I'll start on these next week-end (if not earlier), and if I don't have any problems, probably submit the patch the next week-end...

jg
jg
Posts: 244
Joined: September 12th, 2005, 7:17 am

Post by jg »

Ok. Did it... In what way would you like to have the patch? Till now it is only the basic codework. So since you won't probably want the whole Wesnoth, do you just want the changed files?

I will still implement this into the WML-code of every unit, but a little later. I thought it would be good to show what I did first, so I could get some comments before I go on.

jg
Soliton
Site Administrator
Posts: 1680
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Post by Soliton »

Post the diff to patches.wesnoth.org.
"If gameplay requires it, they can be made to live on Venus." -- scott
jg
Posts: 244
Joined: September 12th, 2005, 7:17 am

Post by jg »

Kind of a noob question but: are you going to review them files before submitting them/whatever you do with them?

jg
SkeletonCrew
Inactive Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Post by SkeletonCrew »

Patches get reviewed before committing.
Also read this post about submitting patches http://www.wesnoth.org/forum/viewtopic. ... 866#136866
jg
Posts: 244
Joined: September 12th, 2005, 7:17 am

Post by jg »

Because I have to ask this anyway, I'll ask it straightaway. Who do you want me to give you the changes for the units? I don't really think you would like me to submit 150+ .diff files for that... :wink: Would it be good if I just submit a gz/bz file of all the units that have been modified?

jg
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

jg wrote:Because I have to ask this anyway, I'll ask it straightaway. Who do you want me to give you the changes for the units? I don't really think you would like me to submit 150+ .diff files for that... :wink: Would it be good if I just submit a gz/bz file of all the units that have been modified?
The units should be updated by a script anyway, so you don't have to give diffs for those. Just describe how they need to be changed.

EDIT: Now, why exactly do the unit .cfg's need to be changed? It's redundant, the code should figure out what the unit advances from by itself, and it should be rather easy, too.
SkeletonCrew
Inactive Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Post by SkeletonCrew »

No 150 diffs is a bit much ;)
I just checked the code but init_types.cpp in set_config around line 1290 already has code to evaluate the advance_from value. I haven't looked at it closely, but can't you use that? Then there's no need to tweak the unit cfg's.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

It's not a good idea to require new keys to be added to most unit .cfg's, if that's not necessary - this isn't, since the code can look up what unit advances to what units and use this information to display the "advances from" stuff in the help.
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Post by Boucman »

yes, you'd have to figure the advance tree by looking at all available units, not write it in a (unreliable) WML key...

esp since this stuff can change from one campaign to the other, the advance_to and advance_from tag etc....


fyi, yes 150+files in diff is fine by me, I can review that.

but changing the WML key, in that particular case, is a bad idea :P
Fight key loggers: write some perl using vim
SkeletonCrew
Inactive Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Post by SkeletonCrew »

I looked at the patch you posted but my patch program (patch under linux) is not happy with your patch :(
What kind of patch is it? If you run svn could you then please post an svn diff?
I look forward to see it in action.
jg
Posts: 244
Joined: September 12th, 2005, 7:17 am

Post by jg »

Yes, I'll try and make it look for itsself what the unit advances_from. Sorry that this is taking awfully long, but it takes some time for me to find myself into a new program... :(

But work is getting along nonetheless. As soon as I get the patch ready I'll try and make it a snv diff, so you can read it... :)

jg
Post Reply