School

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
wisdomless
Posts: 193
Joined: September 20th, 2005, 8:17 pm
Location: A galaxy far far away...

School

Post by wisdomless »

I have an odd idea. Well, it's kinda a question. Is it possible with the WML to make a "house" that gives xp instead of healing? It would be changed from a house to a "school". Players could use "schools" to slowly train a unit up to level 2 (or 3, depending on the settings) without risk of losing it.
If stupidity got me into this, it should get me out.

Most pointless statement of the year award goes to me!
"People are lazy unless they care."
I'd like to thank unsung for this award... and all the people who helped make this possible...
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Yes. This is an easy one.

moveto event filtered on the x,y location of the school

store the unit at the x,y location

add to his experience with set_variable

unstore the unit

You can even set a counter to make sure it doesn't give out too much xp.
Hope springs eternal.
Wesnoth acronym guide.
wisdomless
Posts: 193
Joined: September 20th, 2005, 8:17 pm
Location: A galaxy far far away...

Post by wisdomless »

That was a bit over my head. Could you dumb it down? What .cfg file do I need to do this in?
If stupidity got me into this, it should get me out.

Most pointless statement of the year award goes to me!
"People are lazy unless they care."
I'd like to thank unsung for this award... and all the people who helped make this possible...
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

In order to give xp every turn that the unit stays in the school, simple moveto events and store/unstores won't work. Here's how I'd probably try to do it:

1. When the side's turn ends, check if any units are in a school
2. Store (to an array, for instance) or otherwise mark the units that are
3. In the beginning of the next turn, check if those units are still alive, in place, etc., and then add some xp for those that are

I don't think that it's possible to reliably advance a unit to the next level with WML, so you'd probably need to make sure the xp does stay 1 point below (or at?) the next level xp requirement.

Sorry for not giving any practical help on this, though.
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Good point. You can probably skip steps 1 and 2 and have the event fire on new turn or side turn.
Side turn gives out experience at the end of the turn though.

My perspective had been colored by my current writing mode, which is no turns/unlimited movement.

This needs to be written as an event in the scenario configuration file.
I'll try to post code in a bit if you can't figure things out first.
Hope springs eternal.
Wesnoth acronym guide.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

scott wrote: Good point. You can probably skip steps 1 and 2 and have the event fire on new turn or side turn.
Umm, yeah, that's true. Silly me.
scott wrote: Side turn gives out experience at the end of the turn though.
You can use side turn to give out the xp in the beginning or the end of one's turn (the former really being at the end of the previous side's turn).
wisdomless
Posts: 193
Joined: September 20th, 2005, 8:17 pm
Location: A galaxy far far away...

Post by wisdomless »

...
Okay, that makes sense to me. Kinda... Dang it.
Okay, write it as an event... But would this be applied to all houses? That would be bad. I was trying to create a new "house" and have very few of them on the map. Each one bordering a castle perhaps, but still have normal houses. I know this can be done, but aren't events for campaigns? I was hoping this could be an MP thing.
If stupidity got me into this, it should get me out.

Most pointless statement of the year award goes to me!
"People are lazy unless they care."
I'd like to thank unsung for this award... and all the people who helped make this possible...
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

Events are for scenarios. A campaign scenario is a scenario, and a multiplayer scenario is a scenario.
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
wisdomless
Posts: 193
Joined: September 20th, 2005, 8:17 pm
Location: A galaxy far far away...

Post by wisdomless »

So in MP (as in, on the server) I can have a map with events? That's cool...
If stupidity got me into this, it should get me out.

Most pointless statement of the year award goes to me!
"People are lazy unless they care."
I'd like to thank unsung for this award... and all the people who helped make this possible...
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

The game comes with examples of multiplayer scenarios. Just add your event tags in the file somewhere between [scenario] and [/scenario].
Hope springs eternal.
Wesnoth acronym guide.
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Post by Tomsik »

scott wrote:Just add your event tags in the file somewhere between [scenario] and [/scenario].
Or between [multiplayer] and [/multiplayer], it will work too.
wisdomless
Posts: 193
Joined: September 20th, 2005, 8:17 pm
Location: A galaxy far far away...

Post by wisdomless »

Cool. Thanks!
If stupidity got me into this, it should get me out.

Most pointless statement of the year award goes to me!
"People are lazy unless they care."
I'd like to thank unsung for this award... and all the people who helped make this possible...
wisdomless2
Posts: 5
Joined: April 24th, 2006, 4:56 pm

Post by wisdomless2 »

Did anyone else find this interesting, perhaps enough to implement it? I run SUSE 10.0 now, so I don't have my wesnoth stuff anymore. Plus I have to re-learn all that I knew... But I thought I'd add that SUSE came with a version of wesnoth! Yeah! Even though it's only version 8.0 (or 9.0 I forget.) which is kinda a bummer.
If you laid all of the people over 60 years old in the world end to end, most of them wouldn't be able to get back up.
Dragon Master
Posts: 1012
Joined: February 11th, 2006, 1:04 am
Location: Somewhere

Post by Dragon Master »

I do like your idea of "schools", but I think they should give 4 xp a turn with a 1 xp cap so that you can't make an awesome unit without combat. But they need a better name....Barracks?University?Training Grounds?Arena?
User avatar
Cuyo Quiz
Posts: 1777
Joined: May 21st, 2005, 12:02 am
Location: South America

Post by Cuyo Quiz »

Pits. You may call them Training/War/Blood or whatever, but omst of the ruthlessness that makes the thing work for all factions would be that it is a pit, where two units fight until they are tired.
Cuyo Quiz,where madness meets me :D
Turn on, tune in, fall out.
"I know that, but every single person nags about how negative turin is; it should be in the FPI thread "Turin should give positive comments" =)"-Neorice,23 Sep 2004
Post Reply