XP Bank (MP/SP modification for 1.12/1.13)

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderators: Forum Moderators, Developers

User avatar
ForestDragon
Forum Regular
Posts: 1490
Joined: March 6th, 2014, 1:32 pm

XP Bank (MP/SP modification for 1.12/1.13)

Post by ForestDragon » January 6th, 2017, 11:11 am

hi, so, i made this mod a while ago, but it didn't work. Now it does, and i released it as an addon, here is the description.

Need to urgently level up a unit? some high level unit of yours stole the otherwise useful XP? have a lot of units with small amount of exp? a unit with a lot XP is about to die? well, you came to the right place! this mod provides players a rightclick option to store any units' EXP, and then transfer it to any other one through a somewhat bank-like system, negating all the problems listed above.

feel free to post suggestions, and bug reports

EDIT: there is also a signleplayer version of the mod now, it's in the addon group called 'Other'
Last edited by ForestDragon on November 25th, 2017, 6:00 pm, edited 2 times in total.
Co-creator of Era of Magic
Creator of Tale of Alan (1.12 abandoned),The Golden Age (1.12/1.13, abandoned),XP Bank (1.14),Alliances Mod(1.14), with a large add-on in development
"Real life is like a hyper-realistic VR game, but with permadeath and boring gameplay"

User avatar
Vyncyn
Forum Regular
Posts: 384
Joined: April 6th, 2013, 5:51 pm

Re: XP Bank (MP modification for 1.12)

Post by Vyncyn » January 7th, 2017, 7:06 pm

Pretty cool. It changes the game a lot and creates the need for new strategies. What would be nice is a button to drain all exp from every unit quickly instead of having to deposit from each unit individually.

User avatar
ForestDragon
Forum Regular
Posts: 1490
Joined: March 6th, 2014, 1:32 pm

Re: XP Bank (MP modification for 1.12)

Post by ForestDragon » January 7th, 2017, 7:21 pm

Vyncyn wrote:Pretty cool. It changes the game a lot and creates the need for new strategies. What would be nice is a button to drain all exp from every unit quickly instead of having to deposit from each unit individually.
it would be, but i just don't know how to code that in.
Co-creator of Era of Magic
Creator of Tale of Alan (1.12 abandoned),The Golden Age (1.12/1.13, abandoned),XP Bank (1.14),Alliances Mod(1.14), with a large add-on in development
"Real life is like a hyper-realistic VR game, but with permadeath and boring gameplay"

User avatar
The_Gnat
Posts: 1545
Joined: October 10th, 2016, 3:06 am
Contact:

Re: XP Bank (MP modification for 1.12)

Post by The_Gnat » January 7th, 2017, 9:48 pm

Hi Forest Dragon, you probably could 'deposite all' by creating a fourth option and storing all units of the side and then:

Code: Select all

[sound]
      name=magic-faeriefire-miss.ogg
[/sound]

{FOREACH stored_unit i}
      
       [set_variable]
            name=exp_stored_[$side_number]
            add=$stored_unit[$i].experience
       [/set_variable]     
 
       [modify_unit]
             [filter]
                  id=$stored_unit[$i].id
             [/filter]
             experience=0
       [/modify_unit]

      #OR

      {VARIABLE_OP $stored_unit[$i].experience value 0}

      [unstore_unit]
             id=$stored_unit[$i].id
      [/unstore_unit]
{NEXT i}
I haven't tested this code but it should work (unless i made a silly syntax error ;) )

(also nice mod, i like things like this which change the dynamic of wesnoth)

User avatar
Vyncyn
Forum Regular
Posts: 384
Joined: April 6th, 2013, 5:51 pm

Re: XP Bank (MP modification for 1.12)

Post by Vyncyn » January 7th, 2017, 10:21 pm

Damn, I wish I had seen Gnats code sooner; would have saved me some time. I made this code

Code: Select all

						[option]
					message=  {MENU_IMG_TXT "items/holy-water.png~BLIT(halo/elven/shaman-heal-halo-4.png)" "Deposit All"}
					[command]
						[store_unit]
							[filter]
								side=$side_number
							[/filter]
							variable=exp_drained_unit
						[/store_unit]
						{FOREACH exp_drained_unit i}
						[set_variable]
							 name=exp_stored_[$side_number]
							 add="$exp_drained_unit[$i].experience"
						[/set_variable]
						{VARIABLE exp_drained_unit[$i].experience 0}
						[unstore_unit]
							variable=exp_drained_unit[$i]
							find_vacant=no
						[/unstore_unit]
						{NEXT i}
						{CLEAR_VARIABLE exp_drained_unit}
					[/command]
				[/option]
I already tested it and it seems to work. just add it as a fourth option.

User avatar
ForestDragon
Forum Regular
Posts: 1490
Joined: March 6th, 2014, 1:32 pm

Re: XP Bank (MP modification for 1.12)

Post by ForestDragon » January 8th, 2017, 8:29 am

thanks, guys! i uplodead the version 1.1.0 with this new option
Co-creator of Era of Magic
Creator of Tale of Alan (1.12 abandoned),The Golden Age (1.12/1.13, abandoned),XP Bank (1.14),Alliances Mod(1.14), with a large add-on in development
"Real life is like a hyper-realistic VR game, but with permadeath and boring gameplay"

User avatar
Eagle_11
Posts: 756
Joined: November 20th, 2013, 12:20 pm

Re: XP Bank (MP modification for 1.12)

Post by Eagle_11 » January 17th, 2017, 6:13 pm

Hmm, suppose could be used to let strong fighters feed frail mages all their exp prior to dying.

User avatar
ForestDragon
Forum Regular
Posts: 1490
Joined: March 6th, 2014, 1:32 pm

Re: XP Bank (MP modification for 1.12)

Post by ForestDragon » January 22nd, 2017, 11:11 am

hi guys! so, today i decided to release an update for this mod (the version is 1.1.1), here is the changelog:
1.i gave the xp bank menu a portrait (it's the tomb guardian from DM. since it borrows the image from a default campaign, it is still 'user-without-the-addon'-friendly). 2.'Deposit All' option now uses a repeated version of the sound used by the 'Deposit from this unit' menu. (aka the faerie fire sound) just a small decorative tweak
3.the ''invalid WML' message shouldn't show up now.

basically a patch/decorative type of update
Co-creator of Era of Magic
Creator of Tale of Alan (1.12 abandoned),The Golden Age (1.12/1.13, abandoned),XP Bank (1.14),Alliances Mod(1.14), with a large add-on in development
"Real life is like a hyper-realistic VR game, but with permadeath and boring gameplay"

User avatar
ForestDragon
Forum Regular
Posts: 1490
Joined: March 6th, 2014, 1:32 pm

Re: XP Bank (MP modification for 1.12)

Post by ForestDragon » January 22nd, 2017, 7:15 pm

hi, i know that it might seem weird to release 2 updates in 1 day, but here we go, 1.2.0 is out! this time i added an option to send stored xp to allies (via a right-click option on the ally leader) this will hopefully make the mod more teamwork-friendly
Co-creator of Era of Magic
Creator of Tale of Alan (1.12 abandoned),The Golden Age (1.12/1.13, abandoned),XP Bank (1.14),Alliances Mod(1.14), with a large add-on in development
"Real life is like a hyper-realistic VR game, but with permadeath and boring gameplay"


User avatar
Paulomat4
Moderator
Posts: 713
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: XP Bank (MP modification for 1.12)

Post by Paulomat4 » January 22nd, 2017, 10:21 pm

Hey, I didn't try this out yet, but wqhat do you think about porting it to 1.13 and making it a single-player modification as well? I'm sure It would reach out to a lot more of people then, those who play only campaigns at least when 1.14 is released :)
Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl

User avatar
ForestDragon
Forum Regular
Posts: 1490
Joined: March 6th, 2014, 1:32 pm

Re: XP Bank (MP modification for 1.12)

Post by ForestDragon » January 23rd, 2017, 6:35 am

Paulomat4 wrote:Hey, I didn't try this out yet, but wqhat do you think about porting it to 1.13 and making it a single-player modification as well? I'm sure It would reach out to a lot more of people then, those who play only campaigns at least when 1.14 is released :)
about single-player: yes, i want to, but that would require large changes to the code

well, i don't have the 1.13 version of wesnoth, but if you do, could you port it for me?
Co-creator of Era of Magic
Creator of Tale of Alan (1.12 abandoned),The Golden Age (1.12/1.13, abandoned),XP Bank (1.14),Alliances Mod(1.14), with a large add-on in development
"Real life is like a hyper-realistic VR game, but with permadeath and boring gameplay"

User avatar
ForestDragon
Forum Regular
Posts: 1490
Joined: March 6th, 2014, 1:32 pm

Re: XP Bank (MP modification for 1.12)

Post by ForestDragon » January 23rd, 2017, 8:20 am

1.2.1 update is out! small change: when sending xp to someone, only the sender and the reciever see the message. just a small new change.
Co-creator of Era of Magic
Creator of Tale of Alan (1.12 abandoned),The Golden Age (1.12/1.13, abandoned),XP Bank (1.14),Alliances Mod(1.14), with a large add-on in development
"Real life is like a hyper-realistic VR game, but with permadeath and boring gameplay"

User avatar
The_Gnat
Posts: 1545
Joined: October 10th, 2016, 3:06 am
Contact:

Re: XP Bank (MP modification for 1.12)

Post by The_Gnat » January 23rd, 2017, 8:51 am

Hi forest dragon i just made a quick mod for myself, this (appears) to work for singleplayer campaigns, i would suggest testing it though ;)

Basically i created a fake unit that loads events for campaigns only in the main.cfg file.

(note this doesn't have the newest update you made)
Attachments
XP_Bank.zip
(12.07 KiB) Downloaded 148 times

User avatar
ForestDragon
Forum Regular
Posts: 1490
Joined: March 6th, 2014, 1:32 pm

Re: XP Bank (MP modification for 1.12)

Post by ForestDragon » January 23rd, 2017, 8:59 am

thanks! i will build on from what you made.

btw, i don't think the single-player edition will have xp sending
Co-creator of Era of Magic
Creator of Tale of Alan (1.12 abandoned),The Golden Age (1.12/1.13, abandoned),XP Bank (1.14),Alliances Mod(1.14), with a large add-on in development
"Real life is like a hyper-realistic VR game, but with permadeath and boring gameplay"

Post Reply