Move units between campaigns

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

User avatar
b_sheep
Posts: 2
Joined: September 16th, 2014, 8:37 am

Re: Move units between campaigns

Post by b_sheep »

FYI, temoving all add-ons and re-installing this one didn't have any impact on the problem (still got the same error).

I ended up solving this by manually editing dugi_move_units_between_campaigns.cfg and removing some of the entries from more recent campaigns (which were new-ish) and included some unique units. I didn't try bisecting to find out exactly which campaign caused the issue. This solved the problem.
ItsDaKoolaidDude
Posts: 38
Joined: June 14th, 2012, 4:19 am
Location: Roommate with a dragon in Heart Moutains

Re: Move units between campaigns

Post by ItsDaKoolaidDude »

Ok so I have a few errored and bugged "incompatable" units in the shape of large "X"s, where do I go to clear the cache that contains these listed units?
You spent the entire game, going in circles! It's like the equivalent of Homer Simpson doing cartwheels on the kitchen floor, and you still won?! -Johnny (BSC)
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Move units between campaigns

Post by Dugi »

@b_sheep
You must have exported a weird unit or something. I have edited it to prevent crashes. Sorry I haven't noticed this earlier, if you update it, it should not happen again.

@ItsDaKoolaidDude
You can clear the cache in wesnoth's user data files, then in persist/dugi_move_units_between_campaigns.cfg
The incompatible units are not useless, they may be compatible in another campaign that supports such types.
ItsDaKoolaidDude
Posts: 38
Joined: June 14th, 2012, 4:19 am
Location: Roommate with a dragon in Heart Moutains

Re: Move units between campaigns

Post by ItsDaKoolaidDude »

Dugi wrote:
@ItsDaKoolaidDude
You can clear the cache in wesnoth's user data files, then in persist/dugi_move_units_between_campaigns.cfg
The incompatible units are not useless, they may be compatible in another campaign that supports such types.
Indeed they aren't, however I can't seem to find which campaign they were supported in any longer, its likely I forgot what campagin they belonged to and removed the campaign.
Also I'm afraid what happens if I Alt-A and Delete in the .cfg file, in case that screws something up pretty badly.
You spent the entire game, going in circles! It's like the equivalent of Homer Simpson doing cartwheels on the kitchen floor, and you still won?! -Johnny (BSC)
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Move units between campaigns

Post by Dugi »

ItsDaKoolaidDude wrote: February 19th, 2018, 10:21 pm
Dugi wrote:...
Indeed they aren't, however I can't seem to find which campaign they were supported in any longer, its likely I forgot what campagin they belonged to and removed the campaign.
Also I'm afraid what happens if I Alt-A and Delete in the .cfg file, in case that screws something up pretty badly.
You can always rename the folder and create a new one with the original name in its place. If something breaks, you can restore it.

I don't know of a way to make it remember the name of the campaign the units are from.
coupdegrace1337
Posts: 2
Joined: July 3rd, 2019, 3:24 am

Re: Move units between campaigns

Post by coupdegrace1337 »

Hi there :) Is there a chance that this gets added in version 1.14.7? pretty pls? :mrgreen:
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Move units between campaigns

Post by Dugi »

coupdegrace1337 wrote: July 3rd, 2019, 3:29 am Hi there :) Is there a chance that this gets added in version 1.14.7? pretty pls? :mrgreen:
Done.
BabyDragonV2
Posts: 9
Joined: May 22nd, 2018, 9:58 pm

Re: Move units between campaigns

Post by BabyDragonV2 »

any chance this will be ported to the 1.16 update
User avatar
patience_reloaded
Posts: 62
Joined: August 15th, 2019, 2:38 pm
Location: UTC+1

Re: Move units between campaigns

Post by patience_reloaded »

BabyDragonV2 wrote: June 30th, 2022, 1:30 am any chance this will be ported to the 1.16 update
EDIT: Since this has been posted, dugi updated the add-on to 1.16 and further improved it too. Thanks Dugi!

It can be downloaded from the 1.14 add-on server, https://add-ons.wesnoth.org/1.14/

However, it doesn't work instantly. I had to alter the _main.cfg so that the lua-tag is wrapped in a modification-tag that has an id, name, and type. Not sure if all those keys are required, but it worked for me. After adding these things, I can now activate the mod when I start a new campaign in 1.16.

The full _main.cfg code I use:

Code: Select all

#ifndef MULTIPLAYER
[modification]
	id="dugi_pr_move_units_between_campaigns"
	name="Move Units between Campaigns"
	type=sp
	[lua]
		code = "wesnoth.dofile '~add-ons/Move_Units_Between_Campaigns/move_units_between_campaigns.lua'"
	[/lua]
[/modification]
#endif
BabyDragonV2
Posts: 9
Joined: May 22nd, 2018, 9:58 pm

Re: Move units between campaigns

Post by BabyDragonV2 »

now the question is: does it work in 1.7.10
User avatar
Toranks
Translator
Posts: 168
Joined: October 21st, 2022, 8:59 pm
Location: Sevilla
Contact:

Re: Move units between campaigns

Post by Toranks »

Yes, works. I use it for testing and debugging purposes, not for normal gaming. It's very good and easy to handle.
Every time you use the mod and don't import or export, but choose any other option (even cancel), I get an error message. But it doesn't affect functionality, it's just a visual nuisance.

Hotfix:
Change on the lua file if picked then with if picked.side then
User avatar
Toranks
Translator
Posts: 168
Joined: October 21st, 2022, 8:59 pm
Location: Sevilla
Contact:

Re: Move units between campaigns

Post by Toranks »

I want to include this feature in Advanced Wesnoth Wars. I've fixed the Lua warning and another one I ran into. I've also added the posibility to remove INCOMPATIBLE units, to prevent them from staying there forever in certain cases. Fully translatable and translated to spanish too.
I haven't published it yet, I'm asking just in case the author has a problem with it.
In the meantime, I'll test it in different situations to make sure my changes work well.

Edit: "Move units between campaign is already one of the tools incorporated in Advanced Wesnoth Wars (fork), perfectly compatible with the original's database, and you can have both addons (although it is not recommended to activate them at the same time)
Last edited by Toranks on June 11th, 2023, 9:24 pm, edited 1 time in total.
Elder_Mage_Hendrick
Posts: 30
Joined: August 28th, 2018, 9:30 am

Re: Move units between campaigns

Post by Elder_Mage_Hendrick »

How exactly do I remove INCOMPATIBLE units?
User avatar
Toranks
Translator
Posts: 168
Joined: October 21st, 2022, 8:59 pm
Location: Sevilla
Contact:

Re: Move units between campaigns

Post by Toranks »

Elder_Mage_Hendrick wrote: June 11th, 2023, 9:19 pm How exactly do I remove INCOMPATIBLE units?
You need to use the "Move unit between campaigns" tool in Advanced Wesnoth Wars (fork) and delete it like any other unit. The original version doesn't support that.
Elder_Mage_Hendrick
Posts: 30
Joined: August 28th, 2018, 9:30 am

Re: Move units between campaigns

Post by Elder_Mage_Hendrick »

Toranks wrote: June 11th, 2023, 9:22 pm
Elder_Mage_Hendrick wrote: June 11th, 2023, 9:19 pm How exactly do I remove INCOMPATIBLE units?
You need to use the "Move unit between campaigns" tool in Advanced Wesnoth Wars (fork) and delete it like any other unit. The original version doesn't support that.
Thank you for your quick response!
Post Reply