[Modding] Allowing teams in the available maps

The new Heroes games produced by Ubisoft. Please specify which game you are referring to in your post.
JamaY
Leprechaun
Leprechaun
Posts: 29
Joined: 01 Jun 2006

[Modding] Allowing teams in the available maps

Unread postby JamaY » 01 Jun 2006, 23:56

Hi, I'm new to these boards :)

I have been messing around with the maps available in the release version of HOMMV, so I can play in hot-seat or LAN with other people without having to play FFA. I managed to change the existing maps (Warlords, for example, is now 2v2v2v2), but I still don't know how to ADD new maps to the available ones.
For example I'd like to have Warlords in 3 versions: 8 teams (FFA), 4vs4 and 2v2v2v2, without having to replace the files in the data/maps/multiplayer directory each time I want to switch from one to another. I tried copying the directory containing the map and rename it so it doesn't conflict with other maps (XL3 for example), but when I start the game the map doesn't have a name or description, and when I create a game with the map it doesn't show any objectives in the scenario information. I didn't test it to see if you can win, but probably not, so the map is unplayable.

Can anyone with a better knowledge of modding help me out with this one?

Thanks in advance :)

User avatar
Paradox
Conscript
Conscript
Posts: 229
Joined: 05 May 2006
Contact:

Unread postby Paradox » 02 Jun 2006, 00:05

try just renaming the map names and folders?

thing is. they should have really included a better team system to the game. having the map define the teams sucks, i always found myself editing Heroes III maps so i could be allies with a friend and play against the AI, wheras unmodified, its just 1VALL or something. in the create game menu there should be an option to change the teams or "Use map settings"

JamaY
Leprechaun
Leprechaun
Posts: 29
Joined: 01 Jun 2006

Unread postby JamaY » 02 Jun 2006, 00:54

That's exactly what I did...lets say I made a copy of L4 (Rise to power), renamed it to L5, and changed the files so it could accept teams. It was recognized by the game, but it was missing the name, description and objectives.

I found this in the "map-tag.xdb" file:
<NameFileRef href="/Name.txt"/>
<DescriptionFileRef href="/Description.txt"/>

I tried creating both a Name.txt and a Description.txt files with the content I wanted in the same directory, but it didn't change anything.

BTW, I was inspired by the modified maps you posted on www.elrath.com to change the maps myself. Your maps only allowed 2 players to play against the rest...so 8-player maps became 2vs6...not very balanced. It's not that hard to get 4vs4 or 2v2v2v2, though, since ou only have to set the first 2 players in the X#.xdb file (for example L4.xdb) in team 1, the 2 next in team 2, etc. Players can then choose where in the map they want to be, but they can't choose teams with different sizes than the ones preset in the map (you can't decide to do 3v3v2 for example). In the "map-tag.xdb" file just add
<teams>
<Item>2</Item>
<Item>2</Item>
<Item>2</Item>
<Item>2</Item>
</teams>
And it will recognize it as a 2v2v2v2 map.

User avatar
Curio
Leprechaun
Leprechaun
Posts: 29
Joined: 01 Jun 2006
Location: Canada

Unread postby Curio » 02 Jun 2006, 02:33

You're right--that's how you make a map 2v2v2v2 (writing in <Item>2</Item> 4 times in a map's map-tag.xdb file, in Wordpad or something).

But to clarify on how to make the actual teams:

Open the map's larger xdb file (Warlords is M4.xdb), also with something like Wordpad. Go Edit > Find > team, and it'll go to this line:

<CustomTeams>false</CustomTeams>

Obviously, you'll want "false" to be changed to "true".

Keep searching for team, and not too far below the CustomTeams line, you'll find:

<Team>1</Team>

This exists within a large chunk of script under an <Item> heading; there are 8 blocks of this, because you can at most have 8 players. Get it?

The number 1 can be 0-4; 0 means that player is not considered, as in, the Warlords map will now be 7 players if you changed this to 0.

I believe each block of this script corresponds to a colour...so the first instance of:

<MainTown href="https://www.celestialheavens.com/forum/topic?p=48658#xpointer(id(item_e748a92a-02b0-4f39-be30-51bb100cbfdd)/AdvMapTown)"/>
<MainHero/>
<ActivePlayer>true</ActivePlayer>
<Team>1</Team>
<CanBeHumanPlayer>true</CanBeHumanPlayer>
<CanBeComputerPlayer>true</CanBeComputerPlayer>
<Behaviour>PB_RANDOM</Behaviour>
<CaptureAbility>0</CaptureAbility>
<StartHero/>
<HeroInTown>true</HeroInTown>
<ReserveHeroes/>
<AddHeroTrigger>
<Action>
<FunctionName/>
</Action>
</AddHeroTrigger>
<RemoveHeroTrigger>
<Action>
<FunctionName/>
</Action>
</RemoveHeroTrigger>
<VictoryMessageRef href="/"/>
<DefeatMessageRef href="/"/>
<Race>TOWN_RANDOM_TYPE</Race>
<Colour>PCOLOR_NEUTRAL</Colour>

...is the RED player. The order is as follows:

RED = 1st instance
BLUE = 2nd...
GREEN = 3rd...
YELLOW = 4th...
ORANGE = 5th...
TEAL = 6th...
PURPLE = 7th...
BROWN = 8th...

Since you'd like a 2v2v2v2, you'll need to change the number within the section of my above bolded script. Use 1-4, and think of them as team numbers, team 1, team 2, team 3, and team 4. Obviously, for 2v2v2v2, you'll have to change the # between <Team> and </Team> so you have TWO 1's, 2's, 3's, and 4's; 2 ppl or colours exist on each team.

Save, exit, and play. :)

EDIT: BTW, you want these to be TRUE in the above:

<CanBeHumanPlayer>true</CanBeHumanPlayer>
<CanBeComputerPlayer>true</CanBeComputerPlayer>
Last edited by Curio on 02 Jun 2006, 02:54, edited 1 time in total.

User avatar
asandir
Round Table Hero
Round Table Hero
Posts: 15481
Joined: 06 Jan 2006
Location: The campfire .... mostly

Unread postby asandir » 02 Jun 2006, 02:37

WOW .... this is good stuff, well done guys

JamaY
Leprechaun
Leprechaun
Posts: 29
Joined: 01 Jun 2006

Unread postby JamaY » 02 Jun 2006, 04:24

Thanks curio, but I already knew that :D

What I'm looking for is a way to add new maps to the available ones..lets say add the 2v2v2v2 map you designed to the the 8-player FFA original map, so I can choose from both in the map menu. That way I wouldn't have to change the files to play in teams when I want to play with a friend, and then have to go back to the original files when I want to play alone.

User avatar
Curio
Leprechaun
Leprechaun
Posts: 29
Joined: 01 Jun 2006
Location: Canada

Unread postby Curio » 02 Jun 2006, 05:09

OH, I see what you mean!

Hmm...never thought about that. ;| You're right, I've just been modding them back and forth for when I want 2v2v2v2 or just back to a single player FFA. Yeah, it would be more convenient if I could just make more versions of the same map, but at this point, I'm not sure it's worth the effort...

It doesn't take very long really to change those parameters we know, and I'm thinking it'll take much more digging to figure what you propose. Personally, I can wait for the map editor to address this (which it better), so I'm not sure I'm much help. :(


Return to “Heroes V-VI”

Who is online

Users browsing this forum: Google [Bot] and 0 guests