User-defined eras?

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

Moderator: Forum Moderators

Post Reply
Dwarvish Bard
Posts: 95
Joined: March 3rd, 2005, 7:40 am
Location: Austin, Texas
Contact:

User-defined eras?

Post by Dwarvish Bard »

I'm trying to define a new era, mostly as a tool for testing the factions in a new campaign I'm working on. I can add an era by creating a ~/.wesnoth/data/scenarios/multiplayer.cfg that defines an [era] with some [multiplayer_side]s in it, and I can get it to support my sides in the side-chooser menu by defining a [binary_path] to pick up the images.

However, I can't get it to support my units, whether by including them or by spelling them out in [unit]s directly within the [multiplayer_side] definition.

Is there a trick for doing this? I would prefer including the units by loading everything in a data/campaigns/mycampaign/units/ directory, but can deal with pasting them into my [multiplayer_side]s if includes aren't supported.

Thanks
romnajin
Posts: 1067
Joined: February 26th, 2005, 7:26 pm
Contact:

Post by romnajin »

It's easier just to copy things from multiplayer.cfg(the config that defines eras), so you know your code is right.
Sorry for the meaningless post
Dwarvish Bard
Posts: 95
Joined: March 3rd, 2005, 7:40 am
Location: Austin, Texas
Contact:

Post by Dwarvish Bard »

romnajin wrote:It's easier just to copy things from multiplayer.cfg(the config that defines eras), so you know your code is right.
That's what I did. In fact I copied the whole file, deleted all but two factions and the random chooser pseudofaction, changed the [era] id and name, and started a game to see if Wesnoth was going to pick up user customizations.

That worked, but it broke when I changed the specifications for the menu listings. I was able to fix that by adding a [[binary_path]] to the directory holding the images I want in the menu, but I haven't been able to find a similar mechanism for causing it to pick up the unit definitions I want.

Does any such mechanism exist? I have tried putting {data/campaigns/mycampaign/units} or {campaigns/mycampaign/units} in the new .cfg file before any of the [multiplayer_side] tags, and that didn't work. I also tried putting [unit] sections directly in the [multiplayer_side] sections, after the id= but before any of the units are specified in leader= or recruit=, and that didn't work either. Is there something else I should try? Does Wesnoth even support what I'm trying to do?

Thanks.
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Have you seen "The High Seas MP era"?

If so, maybe you could modify the main .cfg file to read (renaming as appropriate):
#ifdef MULTIPLAYER
{@campaigns/High_Seas_MP_era/}
[+units]
{@campaigns/High_Seas_MP_era/units}
[/units]
#endif
Hope springs eternal.
Wesnoth acronym guide.
Dwarvish Bard
Posts: 95
Joined: March 3rd, 2005, 7:40 am
Location: Austin, Texas
Contact:

Post by Dwarvish Bard »

scott wrote:Have you seen "The High Seas MP era"?

If so, maybe you could modify the main .cfg file to read (renaming as appropriate):
#ifdef MULTIPLAYER
{@campaigns/High_Seas_MP_era/}
[+units]
{@campaigns/High_Seas_MP_era/units}
[/units]
#endif
Still no joy. I don't see where the High Seas MP era is creating any new units though, and that's precisely where mine breaks. I don't have any trouble if I just use standard units in it. And my unit definitions seem to be OK, because I can play them in my draft campaign scenario.
Darkmoon
Posts: 90
Joined: December 20th, 2004, 7:06 pm

Post by Darkmoon »

But isnt that a problem? That the other person does not have non-standard(custom) charcters/units on their computer....?

Maybe if they had downloaded campaign with these non standard units, maybe then they could use them in MP. I do not think that connecting to MP game permits download of custom data(pics, different stats).




With the High Seas Era.... that works in multiplayer, that unit data is already on computer of each person connecting to the MP game. But if you try to use your own custom units that are only on your computer alone... it does not work then.


((it is only a theory of mine,... dunno if it is correct))
Dwarvish Bard
Posts: 95
Joined: March 3rd, 2005, 7:40 am
Location: Austin, Texas
Contact:

Post by Dwarvish Bard »

Darkmoon wrote:But isnt that a problem? That the other person does not have non-standard(custom) charcters/units on their computer....?
Yes, that would definitely be a problem, though of course not in human-vs-AI mode. If what I'm trying to do is not supported I would find that decision reasonable, but so far no one has come out and said "it's not supported". So I'm still left wondering whether I'm trying to do the impossible, or just going about the possible incorrectly.

Maybe it has never come up before, and the developers don't have a policy on it.
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

I know other people have tried to define units in a multiplayer context with no luck. I'll try my own idea when I get access to my work computer and verify that it doesn't work.
Hope springs eternal.
Wesnoth acronym guide.
Post Reply