• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

how can i easily create the battle for middle earth build system

Status
Not open for further replies.
Level 21
Joined
Mar 2, 2010
Messages
3,069
i am working on a map where i am using the build system from lord of the rings battle for middle earth 1. the problem is that i have to use a lot of triggers because i dont know of any other way, is there an easier way to do it?
 

Attachments

  • war over land0.8.w3x
    394.3 KB · Views: 80
Level 21
Joined
Mar 2, 2010
Messages
3,069
the way it works is that players can only set up bases at specific areas and the buildings are built from building slots of some kind. you can find out more if you test the map because the build system is present but, it is only partially present. many areas are still unscripted and i want to find out if there is an easier way to do it.
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
that suggestion would only limit construction but still use the warcraft 3 build system. i did try it when i first worked on the map but people hated it so i had to get creative. that is when i started adding the lord of the rings battle for middle earth 1 build system. it is also present in halo wars and dungeons and dragons dragonshard. the map is included in the post and both build systems is present but the problem i am faced with is the amount of work i do for one build site so, i am looking for an easier way to create it.
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
that would also just use the warcraft 3 build system and that isnt what i want. i want the lord of the rings battle for middle earth 1 build system. i have already created it for several base sites but i am trying to get an easier way to do it so that i can work faster.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
You define each buildable area as a index. This index you use to represent the necessary state information in arrays. Such as a rect array for where the building should occur and a integer array to keep count of available slots.

When a player builds a building, you find which rect it was in and if free slots are 0 or it is built in none of the rects you cancel construction. Otherwise you decrement free slots by the necessary amount. When a building dies you find which rect it was in and increment the free slots, refunding the buildable slot.
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
as i said i dont want to use the warcraft 3 build system so, please dont provide any more solutions that uses that system. the build system in lord of the rings battle for middle earth 1 is completely different from the warcraft 3 system. i suggest that you take a look at the map i provided for clues and play as the red player while staying on the right side of the map.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
You define each buildable area as a index. This index you use to represent the necessary state information in arrays. Such as a rect array for where the building should occur, a integer array to keep count of available slots and the central building which does all the construction.

When a player presses a button to create a building, you find which rect it was for (probably using linear search) and if free slots are 0 or the building is in none of the rects or ability not a building to build you end the trigger. Otherwise you decrement free slots by the necessary amount and find a random point to build. You then use a dummy unit to build or create the building and do the building (which is locust so players cannot select it). Alternatively if you want the building to be built by triggers entirely you can create it using the appropriate function then pause it for a certain amount of time to represent its construction. When a building dies you find which rect it was in and increment the free slots, refunding the buildable slot.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
Because it allows you to set up new build sites using variables instead of writing entire new triggers each. This reduces procedural coupling.

The idea is you create a core system that you feed data describing the build sites and that then handles everything else. Even if it only manages 2 sites or if it manages 200 sites.
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
the way the system i have used works is that it uses buildings called building hubs that are generated whenever a new site is claimed. that is what i want but i want a method that can do that with less work per site. is there a way to make your system work with my system.
 
Last edited:
Level 5
Joined
Dec 15, 2010
Messages
115
For those curious as a few didn't know, Lord of the Rings Battle for Middle Earth uses a build plot system, he wants to create that instead of being able to build anywhere you wish, like on Warcraft games.

I know that doesn't help the question, but hopefully it helps others know how LotRBfME works, so they can help him.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
Unless you want the game to guess where plots should go, you will need to feed them into the system.

One possible method would be to get the system to imply that all plots within an area belong to a base. This would save you having to add each plot individually to the system and instead only adding each base while placing the plots as units in the editor.
 
Level 6
Joined
Feb 10, 2011
Messages
188
Ahh i remember the game now
Basically you have cities with walls around it, in the middle of the city you have a townhall like building.
Each city, depending on the size, has a set amount of available space
For those who dont know what the system is btw.
Ill look at ur system soon ans try to help.

/e

imo the quickest way to do this is to put a different terrain type for the slots that a building may be in. then when a player goes to build a building, check to see if he owns the center hub and if he does allow him to place the building. When a player loses the hub, destroy the buildings.
This way:
You wont have to trigger so much
It's not the Warcraft 3 build system
It does resemble the BFME system, hell you could even add the walls around each hub, and make spots for the towers and the hidden passage thing.


If you dont want to use terrain, Use a custom doodad. Like a flag, or circle of power, and make it able to be build on. (idk if its all possible though) if its not close enough to the doodad. don't let the player build it.
 
Last edited:
Level 21
Joined
Mar 2, 2010
Messages
3,069
Unless you want the game to guess where plots should go, you will need to feed them into the system.

One possible method would be to get the system to imply that all plots within an area belong to a base. This would save you having to add each plot individually to the system and instead only adding each base while placing the plots as units in the editor.
seems like a good idea but please explain how i can trigger it.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
I assume each base has a control plot. This control plot is what players capture and with it come the other plots.

This means you need the following data for each plot.
1. A unit group (or unit list if you are some vjass fan) that represents all plots that accompany the central plot.
2. The actual central plot unit itself.

To build all plots, you need to manually specify where their central plot units are, probably directly into the system data array. You can then guess what plots accompany them because they should be roughly in the same area. If you say no plot is more than 1500 units from the central plot then you can iterate all plots in that area and add them to the plot group accompanying the central plot. You do this for all plots you fed into the system.

When a plot is captured, you find which central plot was captured (use linear search, unless you have >100 plots it makes little difference) and you then change ownership of all units in the accompanying plot group to their new owner. If buildings cannot be captured (plots destroyed on capture) then you need to add the tests for that during the ownership change.

For capturing a plot you could use any sort of event. Such as a unit dies event where you create a new central plot over the dead old one and update all references to it. Plot ownership might change when you buy the plot which would be a purchase event, only ownership change occurs here. Perhaps a combination is used where players must first kill the central plot which converts it to neutral and then buy it with some sort of purchase event. The choice is up to you.
 
Status
Not open for further replies.
Top