Need Assistance in making an era using units from campaigns

It's not easy creating an entire faction or era. Post your work and collaborate in this forum.

Moderator: Forum Moderators

Post Reply
haisoon
Posts: 2
Joined: January 1st, 2016, 12:42 pm

Need Assistance in making an era using units from campaigns

Post by haisoon »

Hello I really dont know much of anything in regards to coding in this game. I have a little background in coding using html, just enough to have an idea of how coding works in general need to be entered.

I am having difficulty taking campaign unique units and incorporating them into a single era. I suspect the key lies somewhere in main.cfg, but I am not sure.

The ultimate goal, is for me to take every unit that comes with the game(without any add-on user made units) for use in multiplayer add-on colosseum.

So far I have been 100% successful in making a functional era using units such as sea serpent, ancient lich, etc from the core data. However I cannot get any units from campaign data working(such as desert elves from under the burning suns)

The solution if I had to guess, lies in getting the era to recognize the unit ids from the campaign units. I suspect this is to be done in main.cfg .

My success with units in the core data, was done by simply identifying units and their id names and adding on to the coding done by the creator of colosseum.
The successful file is "colosseum_ultimate extended_era", and the current file I am seeking to get functional is "Colosseum_campaign_era".

I also uploaded the main.cfg file as well.

Ideally the colosseum campaign era would be a leader only era(just like the regular coloseum era), that would have a faction containing the unique units from each campaign. So for example under the burning suns would be a faction, rise of wesnoth, etc.

I am sure that if it could be explained to me how to get one campaign set of units working, I could get the rest working.

Any help to make this work would be much appreciated.
Attachments
Colosseum_Ultimate_Extended_era.cfg
completed file
(818 Bytes) Downloaded 326 times
Colosseum_Campaign_era.cfg
Need help getting these units functional
(819 Bytes) Downloaded 338 times
_main.cfg
need help getting the units from coloseum campaign era unit ids recognized
(199 Bytes) Downloaded 338 times
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Need Assistance in making an era using units from campai

Post by zookeeper »

None of the campaign data (aside from that needed for the campaign menu) is loaded unless that campaign is being played. Therefore, if you want to include units from campaigns, you need to explicitly do it with a [+units] tag, just like the campaigns themselves do in their _main.cfg. So, to get the desert elves, you'd need this in your _main.cfg (inside the #ifdef):

Code: Select all

[+units]
    {campaigns/Under_the_Burning_Suns/units/units.cfg} #for the movetypes
    {campaigns/Under_the_Burning_Suns/units/elves} #for the elf units
[/units]
However, it's not very good form to depend on even a mainline campaign like that: not everyone necessarily has them, because they aren't automatically bundled on all systems. So you should add a note to your add-on description that the mainline campaigns are required for it to work right.

EDIT: And to actually get the unit images from each campaign to show up, you of course also need a corresponding [binary_path]. Which you can just copy from the campaign's own _main.cfg.

EDIT: And some units in some campaigns might require some extra macros the campaign defines in some utils file, so you'd need to make sure you include those as well.
haisoon
Posts: 2
Joined: January 1st, 2016, 12:42 pm

Re: Need Assistance in making an era using units from campai

Post by haisoon »

Thanks for the help. So far I was able to add the Desert Elves no problem. Currently however I am still having trouble with adding units with unique abilities.

Currently when I am uploading a campaign I have a binary path complete to the campaign.

Currently I get the following error whenever I try to load the campaign.

Macro/file 'ABILITY_DISTRACT' is missing
at campaigns\\The_Rise_Of_Wesnoth\\units\\Wesfolk_Lady.cfg:12
included from add-ons\\ColosseumUltraExtended\\_main.cfg:82


in the main file the macro looks like this
[+units]
{campaigns/The_Rise_Of_Wesnoth/_main.cfg}
{campaigns/The_Rise_Of_Wesnoth/units}
{campaigns/The_Rise_Of_Wesnoth/utils/trow-abilities.cfg}
{campaigns/The_Rise_Of_Wesnoth/utils/trow-macros.cfg}
[/units]



I am also having this problem with mer units in Dead Water. Thank you for your help, it has already worked well so far.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Need Assistance in making an era using units from campai

Post by zookeeper »

That's because you're including the unit .cfg's which use the macros before you include the macros. You always have to include macros before the point at which they're used.
Post Reply