Editing Warlords to become 2townssamerace 4teams

Maps and the art of mapmaking.
Hatboy
Leprechaun
Leprechaun
Posts: 4
Joined: 16 Nov 2008

Editing Warlords to become 2townssamerace 4teams

Unread postby Hatboy » 16 Nov 2008, 19:23

Hi,

I am completelly new to the mapmaker. I have no scripting skills or programming experience.

What I want to do is to create 4 teams(one player for each team) that each have 2 towns of the same race. I want to be able to choose races in the game, I dont want to have them "set" in the mapmaker and then unchangeble in the game

I dont want to use the allied hof warlords as a base. I prefer original warlords map (because of the bigger neutrals stacks and artifacts)

Is it possible to do this? I have searched for this topic but i could not find.

Varm regards
Hatboy

User avatar
Asheera
Round Table Knight
Round Table Knight
Posts: 4506
Joined: 06 Jul 2008
Location: The Shadows
Contact:

Unread postby Asheera » 16 Nov 2008, 19:31

Is it about Heroes 5? If yes, then no, it's not possible. The teams can't be created in the game, they are only set up from the Map Editor and 'set' in the map.

You must make a new map with the teams set up differently if you want this.

If you don't know how then ask here and I'll help. :)
No matter how powerful one becomes, there is always someone stronger. That's why I'm in a constant pursuit of power, so I can be prepared when an enemy tries to take advantage of me.

Hatboy
Leprechaun
Leprechaun
Posts: 4
Joined: 16 Nov 2008

Unread postby Hatboy » 17 Nov 2008, 06:00

Thanks for the quick reply:)

Yeah its heroes 5. I managed to set teams in the map editor. Dividing 8 towns into 4 teams and 4 players (assigning for example player 1 for 2 towns and player 2 for 2 town and so on).

But only one town in each team becomes the race chosen in the game startup. The second town becomes random.

Is there anyway to link the second town in each team to follow the chosen race? I.e You choose fortress to play and get two fortress town, not 1 fortress + 1random

I set team and player for each town. Then I also tried the "link town" funktion. Linking the second town to the first town in each team. "As player x" instead of "random" did not work.

How do i do this?

if something in my explanation is unclear please ask

Varm regards,
Hatboy

User avatar
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

Unread postby Grumpy Old Wizard » 17 Nov 2008, 11:46

You are going to have to do some scripting to do this. There may be another way to do this but this is the only way I caon think of.

1) First, for the non scripting part. Keep only 4 of the towns chosable as starting locations. Change the 4 others to neutral.

2) Now you need to make a region in front of each of the non neutral towns. Each region will have to have a different name. I recommend starting each region name with the small letters rgn.

3) Now for the scripting part. The script for each region is going to have to do 2 things:

First the script will need to determine the type of player that the player for that town type is. To do this you will ue the GetCurrentPlayer command. Second the script will have to transform the appropriate neutral town into the typ of town the player has.

Now lets assume you name each region rgnPosition1, rgnPosition2, rgnPlosition3, and rgnPosition4. Your script for the first region would be something like this:

function Position1(heroename)

if HasHeroSkill(heroename, 17) == true then --look for class skill artificer
TransformTown ("Feschnia", 2); --Academy (2 is the script town type for academy)
end;

if HasHeroSkill(heroename, 16) == true then --look for class skill avenger
TransformTown ("Feschnia", 1); --Sylvan
end;

if HasHeroSkill(heroename, 151) == true then --look for class skill for fortress
TransformTown ("Feschnia", 6); --Fortress
end;

if HasHeroSkill(heroename, 13) == true then --look for class skill training
TransformTown ("Feschnia", 0); --Haven
end;

SetObjectOwner("Feschnia", PLAYER_1); --give neutral town to player
end;
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "rgnPosition1");
end;
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "rgnPosition1", "Position1");

I only did the script for 4 different playable town types. You do it for the rest of them. You can find the script IDs for each class skill under the map editor manual new script ID manual.

Also, you will need to replace "Feschnia" with the name of the appropriate neutral town that you want to transform into the player type.

Now if you haven't done any scripting you may be lost. I suggest you follow my recommendations at the below link to learn some scripting.

viewtopic.php?t=9461

The map editor manuals can be found by clicking on your windows Start button -->All programs -->Ubisoft --> Tribes of the East --> Manuals -->Editor manuals

The names of the towns that you need to use are not the name you give them in the editor but the scripting name the editor automatically assigns the town. To determine the scripting name click on the town to highlight it in the editor. Now click on the Object Properties Tree button near the top center of the editor tool bar. It looks sort of like 2 capital Ts. Look down 4 likes and you see "Name" if you look in the field to the right of that you will see the internal scripting name that the editor assigned the town.

The script example I gave you will transform the appropriate town into the player's type once the player enters the region in front of the town. Don't place the region right next to the town, put it a couple of squares away and use obstacles to make sure the player has to pass through the region.
Last edited by Grumpy Old Wizard on 17 Nov 2008, 12:42, edited 2 times in total.
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."

User avatar
Asheera
Round Table Knight
Round Table Knight
Posts: 4506
Joined: 06 Jul 2008
Location: The Shadows
Contact:

Unread postby Asheera » 17 Nov 2008, 11:59

Hatboy wrote:I set team and player for each town. Then I also tried the "link town" funktion. Linking the second town to the first town in each team. "As player x" instead of "random" did not work.
Strange, that should work...

Otherwise use GoW's complicated way.
No matter how powerful one becomes, there is always someone stronger. That's why I'm in a constant pursuit of power, so I can be prepared when an enemy tries to take advantage of me.

User avatar
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

Unread postby Grumpy Old Wizard » 17 Nov 2008, 12:39

Yeah, the simple way doesn't work. I tested it to make sure. Such a simple thing should be easily done in the editor but it is not.
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."

User avatar
Asheera
Round Table Knight
Round Table Knight
Posts: 4506
Joined: 06 Jul 2008
Location: The Shadows
Contact:

Unread postby Asheera » 17 Nov 2008, 12:45

Really? But there are a lot of maps with two towns of the same race, and I don't think they all use a script.

(I mean, scripts didn't even work in Multiplayer before TotE and there were still maps with multiple towns of the same race as the starting one)

btw, try "LinkToPlayer" instead of "LinkToTown"... maybe this way it works.
No matter how powerful one becomes, there is always someone stronger. That's why I'm in a constant pursuit of power, so I can be prepared when an enemy tries to take advantage of me.

Hatboy
Leprechaun
Leprechaun
Posts: 4
Joined: 16 Nov 2008

Unread postby Hatboy » 18 Nov 2008, 15:25

Thanks Asheera and Grumpy old wizard:)

I will try linking to player instead of town and if that does not work I will try to learn a little bit of scripting. I´ll let you know of my progress.

Varm regards,
Hatboy

User avatar
Asheera
Round Table Knight
Round Table Knight
Posts: 4506
Joined: 06 Jul 2008
Location: The Shadows
Contact:

Unread postby Asheera » 18 Nov 2008, 15:44

If it doesn't work linking to player then it's really strange... I mean, doesn't the original town work like that as well? (change race with the player's race)
No matter how powerful one becomes, there is always someone stronger. That's why I'm in a constant pursuit of power, so I can be prepared when an enemy tries to take advantage of me.

User avatar
fiur
Pixie
Pixie
Posts: 129
Joined: 06 Jan 2006

Unread postby fiur » 23 Nov 2008, 03:49

this one is'nt hard to solve... :)
Lets say your starting town is at X 10 Y 12
your 2'nd town at X45 Y80
you wanna let the 2'nd town be like your starting town (X10 Y12)
here is what you do:
click on that 2'nd town (radom town ofc... :))
then object properties=> Random Type=> Like Town
then select your main town X10 Y12

I hope this solve your problem... :)

Hatboy
Leprechaun
Leprechaun
Posts: 4
Joined: 16 Nov 2008

Unread postby Hatboy » 25 Nov 2008, 08:46

Hallo everyone.

After some experimenting i found out with your help how to do it. There is no need to script it.

You set first town to player one, player id player 1, town type to random player.
Second town is set player 1 player id none, town type random town and then you link it to the first town.

There is a button marked ... next to link to town. When you press this you can enter the maps and see the reall names of the cities. (Each random city has a "true" name regardless of what name it is assigned in the game. Which is decided by race and randomly)

The downloaded original maps has like L2 or S3 in their file names. These letters and numbers are what you have to remeber when you press ... because they are all you see. Then you just link to the correct true name of the first city. ( the correct true name can be found in object properties)

i hope this is understandeble:) feel free to ask if it wasnt clear enough.

Cheers,
Hatboy


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 4 guests