Jump to content

Wall build tool for RMGs


FeXoR
 Share

Recommended Posts

Works fine for descent hills. Some things look strange though (celtic wall towers for example):

One solution for that might be allowing map entities to conform to the terrain slope and/or specify their height. The map format doesn't support either yet :( Walls will probably need those changes to look good on hills, though your examples don't look bad really.

Link to comment
Share on other sites

One solution for that might be allowing map entities to conform to the terrain slope and/or specify their height. The map format doesn't support either yet :( Walls will probably need those changes to look good on hills, though your examples don't look bad really.

I think it looks fine, as I said before.

Of cause it would be really nice if walls whould bend themselves to the ground, but...

That would be the first game I know that supports such features.

Imo the priority for that is very low.

A worse problem is the garrisoning of units in wall towers.

I expect them to leave divided inside and outside the fortress when 5 units are ungarrisoned, though this could be handled with the check of the nearest passable tiles next to the exit/entrance/drop-point (whatever).

I don't play much yet, because the AIs pile up there peasants in my version and desperately await the alpha9.

The gametest will have some surprises in it's bags I guess ^^

Well, who doesn't like surprises?!

Link to comment
Share on other sites

One solution for that might be allowing map entities to conform to the terrain slope and/or specify their height.

That would look bad as any architect uses plumbs to get an accurate vertical lineup.

In addition to conform to the terrain slope the wall elements then need to be distorted to shape like an parallelogram in order to fit better to the ground and still remain it's vertical lineup.

Similar measures have to be made if the wall bends to the terrain curvature (Like the Great Wall of China does).

Link to comment
Share on other sites

Next and for now final version of the wall_builder rmgen script.

It works like I had in mind and doesn't fail if an unknown civ should be placed.

wall_builder_pack.zip

Included files:

- wall_builder.js: A rmgen script for wall placing. It's inside the rmgen folder where it belongs inside the 'random' directory.

- fortresses.js/json: A simple playtest random map with fortresses added for each player of the corresponding type and style.

- wall_demo.js/json: A demo map to show the different default fortress sizes and their shapes. Documentation in the map description.

- A text file to help figuring out where to put the files.

Here's a screenshot of a small map with 6 players:

post-14196-0-91116800-1331311104_thumb.j

The players civs are clockwise carthaginiens, celts, hellenes, iberians, persians and romans.

Since I use the alpha8 romans are not defined. So the script warns and falls back to the palisade fortress for unknown civs.

I added some hills so the effect to the fortresses can be seen without making it unplayable.

The fortresses add 20 population bonus each. The reason can be read in above posts. I don't think it's that tragic.

To add those civ dependent default fortresses to a random map, just add the following code:

// Place fortresses
var civ = g_MapSettings.PlayerData[i].Civ;
var fort = new wallTool(civ);
fort.setFortress(civ);
fort.place(baseX, baseZ, i+1, BUILDING_ANGlE);

With:

- 'i' the player number starting from 0 for the 1st player (with default color blue) and so on

(In 'fort.place' it's i+1 because 'gaia' is 0 for template placement and 1 is the 1st player)

- 'baseX' and 'baseZ' the x and z coordinates of the players civil center the fortress should include

- 'BUILDING_ANGlE' the orientation of the fortress. (As far as I know the default name for the global orientation for buildings)

To add customized walls it's still the same mechanism as in the opening post.

Feel free to play around with it. ;)

Edited by FeXoR
Link to comment
Share on other sites

New version with wall tower's 'drop points' inside the fortress.

This version no longer grants starting resources (I don't think mines/trees/bushes inside fortresses are realistic).

I will add food supplies like chicken in later versions though.

wall_builder_pack2012-3-15.zip

post-14196-0-11538100-1331810909_thumb.j

IMO iber walls, wall towers and wall gates have to be remodeled. This would enable the usage of wall towers instead of defense towers and so avoid the upkeep gain.

If celt walls/wall towers would be redone also that would make civ specific fortress types unnecessary.

ToDo:

- Add 'cornerInHalf' and 'cornerOutHalf' wall element types with bending of PI/4 (45°). (Especially for celt gates to look better.)

- Add 'placeWallToTarget' capability.

- Add circular wall capability.

- Add 'romanSiege' style.

- Add 'fence' style.

- Add 'road' style.

This is looking and working really well FeXoR. Great stuff (y)

Thanks! And to you Wijitmaker :thank_you2:

Edited by FeXoR
Link to comment
Share on other sites

IMO iber walls, wall towers and wall gates have to be remodeled. This would enable the usage of wall towers instead of defense towers and so avoid the upkeep gain.

If celt walls/wall towers would be redone also that would make civ specific fortress types unnecessary.

Walls are very likely to get an overhaul in the next couple of months for implementing a wall building system for the user. It's good that you offer your input from the RMS point of view though, so all things are taken into consideration (y)

  • Like 1
Link to comment
Share on other sites

and the roman palisade too, please.

Now we Mencionated the defense of a City, why dont implement system of tramps like the series of Sparta Ancient Wars , Fate of Hellas etc.

Check the min 1:03- 1:05

You mean the 'normal' wall, the siege wall or the non-civ-specific palisades? Romans in the wall tool has the normal wall that is quite the same as for carthagians, helenes and persians.

I don't really know what you mean by 'system of tramps'. Falling debris damaging the units around? I should improve my english x)

Link to comment
Share on other sites

  • 2 weeks later...

After a total rewrite and many changes a screen-shot of the new wall_demo random map that should provide code examples of how to use wall_builder.js rmgen.

Changes:

- Added easy to use placeLinearWall(startX, startY, targetX, targetY) function. It can be set more accurate by optional arguments (wallPart, style, playerId, endWithFirst).

- Added easy to use placeCircularWall(centerX, centerY, radius) function. It can be set more accurate by optional arguments (wallPart, style, playerId, orientation, maxAngle, angleOff).

- Set everything up to the changed random map object placement.

- Adjusted celtic and iberian walls.

- Removed the wallTool class that held all the information. That means some functions take more arguments but most of them are optional.

- Added and rewrote documentation.

- Wrote a wall_demo random map as a code example for most cases the wall tool will likely be used.

post-14196-0-54962000-1333987854_thumb.j

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Updated roman siege wall and adjusted width and indentation of the Iberian fortress when build inside a wall. Additionally 'entry' and 'entryTower' now have the same width as gates of that wall style.

Here's an update (only SVN): wall_pack2012-5-1.zip

EDIT: An even newer version is already in SVN. Iberians now get walls as starting entities by default (as their civ bonus). In some maps that doesn't provide enough space (mainly naval maps) only towers are added.

Edited by FeXoR
Link to comment
Share on other sites

  • 1 month later...

Added a special "wall style" "roads". For demonstration I added it to the default starting entity placement function in the rmgen lib misc.js so they will be placed on all random maps.

This version contains the new Iberian starting fortress that fixes http://trac.wildfiregames.com/ticket/1449 as well.

Download: http://fexor.dyndns.org/files/wall_builder_2012-6-7/wall_builder_2012-6-7.zip

Some screenshorts:

roads_test_iber.jpg
roads_test1.jpg
roads_test_cart.jpg
roads_test_romet.jpg
roads_test2.jpg

Edited by FeXoR
  • Like 1
Link to comment
Share on other sites

Great job dude (y)

Thx!

i like Fexor, you are a great contributor, maybe roads can construct a bridge between nearly coast lines

Oh, you're right, forgot to add bridges. I'm on it...

I only support wall placement on random maps and random map scripts in general. I only use artwork that's in already and make it fit together ;).

Thanks anyways, can need the motivation (y).

Edited by FeXoR
Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...