Map making questions

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Map making questions

Frostion
I am in the planning phase of a new map and I got some ideas for it. I just do not know if they can be done. I hope some of you all brilliant and experienced minds can enlighten me on these:

• Does the current TribleA rules allow an air unit to be a land unit transport?
• Can one make it possible for Air units to land after battle in just captured territory?
• Can one make it possible for Air units to land and capture undefended territory?
• Is it possible to make a unit that has Att/Def capability capturable when defeated?
  (Like when the unit is attacked or attacks by its own, looses and then is taken over.)
 
I will probably have some more questions as the map making progresses.
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

panguitch
I'm neither brilliant nor experienced, but I'll take a stab at a couple of these questions.

Frostion wrote
• Does the current TribleA rules allow an air unit to be a land unit transport?
Can the paratrooper tech be used to accomplish what you intend? Set "Paratroopers Can Attack Deep Into Enemy Territory" to true and you can use air transports during combat.

Frostion wrote
• Can one make it possible for Air units to land after battle in just captured territory?
• Can one make it possible for Air units to land and capture undefended territory?
Not that I can see, although I would have expected these as game properties.

Frostion wrote
• Is it possible to make a unit that has Att/Def capability capturable when defeated?
  (Like when the unit is attacked or attacks by its own, looses and then is taken over.)
You can mark a unit as isInfrastructure, and still give it att/def values (at least I know you can give att/def values through techs and supportattachments - not sure if you can give att/def in unitAttatchments--but it's the same end result).

Then the unit can't be selected as a casualty during the battle because it's infrastructure, even though it inflicts casualties. I'm doing this in a map I'm working on, but I have it set so they're destroyed (destroyedWhenCapturedBy) instead of captured.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Frostion
In reply to this post by Frostion
Thanks Panguitch. I will keep the paratrooper ting in mind when making the Air Transport unit.
• But would it also be able to transport unit during a non-combat move? Afterall the option name is "Paratroopers Can Attack Deep Into Enemy Territory"…

It seems to be a challenge or impossible to make a capturable unit be able to fight alone (with multiple hitpoints) and first be captured when it is defeated.  An alternative would be to let the unit just die and have a trigger spawn a new unit of same type (but owned by the winner) where the battle took place or in the winners capital.
• Is this possible with triggers?
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

panguitch
Yes, paratrooper tech can be set to allow both combat and noncombat moves.

Right. Infrastructure unit won't fight if it's alone. Destroying it and replacing with a new unit would almost work, but the complication would be you'd need different conditions and triggers for every possible territory.  This would be simpler if the unit in question was a unique unit. Might also be slightly simpler if rather than placing the "new" unit, you added it as a purchase and let the player place it.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Frostion
In reply to this post by Frostion
OK, I got two new question concerning transports and AI thinking:

• Can the AI handle the landtransport and paratrooper transport system? Or is this to complex to use for the AI?

• Can the AI handle building units that consumes existing units and/or requires an existing unit to be present in the build zone?

Like in TWW where non-moving “materials” and an engineer unit is needed to build barracks.
… or like if a unit can only be build by a specific moving factory unit. Will AI build it?
… or like if a unit is “upgradable” and replaces an older unit. Does the AI do this?

I would like similar systems in my next map, but if the AI can’t handle systems like that then I would most likely drop it and keep my map AI compatible.
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

hepster
As far as I know at this this point no.  That is why often times map makers spell out for players where or not a game is (really) AI compatible.

To my knowledge the AI has never completed a Battle Ship in TWW or transformed materials into a structure.  That logic for the AI is probably a long way off (and thus far fairly specific to that map as well as a few others).  

If you are pursuing advance building structures you should probably assume that any of the available AI cannot handle it.

As far as air transport... not 100% sure.  However I'm not even remotely close to an AI guy, not do I do much testing with it.
“A man can never have too much red wine, too many books, or too much ammunition”― Rudyard Kipling
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

redrum
Administrator
@Frostion - Respones to your questions:

1. Can the AI handle the landtransport and paratrooper transport system? Or is this to complex to use for the AI?

- Currently, it doesn't handle landtransport or paratroopers. I think these could be potentially implemented but would be challenging and are low priority since so few maps use them.

2. Can the AI handle building units that consumes existing units and/or requires an existing unit to be present in the build zone?

- Currently, it ignores all units that consume existing units (will never buy them). If they require existing units to just be present then it should work though if its complex like having to move a certain unit to a territory in order to produce units then it wouldn't understand needing to move it. This could be implemented but is difficult as almost every map is different and very few maps use it. There would need to be a way to determine whether its worth consuming existing units to create the new unit and also potentially logic to purchase/move consumable units if trying to purchase a unit that consumes them.
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Frostion
@redrum

I would really like to have units in my next map that are “Village”, “Town-Upgrade” and “City-Upgrade”. They would be upgradable factories with village as the basic starting unit.

You say the Hard AI would not buy units that consumes existing units…but:
Do you know if the Hard AI would be able to place units, like Town-Upgrade that would require and consume a Village, if it had received the Town-Upgrade via a trigger that placed it in the AIs purchased list?

I would think the AI would first try to place the Town-Upgrade anywhere else than in the territory with a village/factory, but when it ran out of options, it would place it in a territory where there is a village, thereby replacing it?

PS: Is there an XML way to prevent a factory unit from being placed on territories with less than X PU income?
(Like Village can only be placed on 3 PU territory and maybe Town-Upgrade on 6 PU territory)
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

redrum
Administrator
@Frostion - Maybe.

The AI has logic to try to place any 'extra' non-sea units. This logic was mostly written to handle WW2V3 China placement where there is a trigger to give China infantry.  

There is also logic to handle Warlords in Eschelon's new map where it determines where to place them during purchase so that it doesn't purchase too many units.

Both of these are currently written to handle regular land and air units but may still work in some capacity with factory and upgrade units. This may handle your triggered factory upgrades though not intelligently since it will just place it like it was a regular land/air unit.

If you end up going down this route, let me know and I can try to help test it. In general, placing is much easier than purchasing since you have a set of units that just need to be placed somewhere vs purchasing you have many options and need to choose what to purchase.
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Frostion
Thx for the help folks!  I am making progress with the ”Dragon War” fantasy map. The paratrooper-thing works. I have not done so much AI testing yet, but it will come. Here is a sneak preview of the map … WIP:


However, I have also run into some problems:

I have 3 basic factory units: Village (Basic w. 3 build cap.), Town (Upgrade w. 6 build cap.) and City (Town upgrade with 9 build cap.)

The Village is only meant to be build in 3 PU+ territories, and I got this restriction working. The "unit information", when pressing the I-key, also states the correct info. But when it is placed in a 6 PU territory, then it is still possible to place 6 units? Why? What is wrong?



This is the unit:
        <attatchment name="unitAttatchment" attatchTo="Village" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
            <option name="isFactory" value="true"/>
            <option name="canBeDamaged" value="false"/>
            <option name="canProduceXUnits" value="3"/>
            <option name="destroyedWhenCapturedBy" value="AI"/>
            <option name="repairsUnits" value="1:Brown-Dragon:Water-Dragon:White-Dragon:Blue-Dragon:Red-Dragon"/>
            <option name="canOnlyBePlacedInTerritoryValuedAtX" value="3"/>
        </attatchment>

I also got these properties in the <propertyList>:
        <property name="Unit Placement Restrictions" value="true" editable="false">
            <boolean/>
        </property>
        <property name="Production Per X Territories Restricted" value="true" editable="false">
            <boolean/>
        </property>
        <property name="Production Per Valued Territory Restricted" value="true" editable="false">
            <boolean/>
        </property>
        <property name="Place in Any Territory" value="true" editable="false">
            <boolean/>
        </property>
        <property name="Unit Placement Per Territory Restricted" value="true" editable="false">
            <boolean/>
        </property>
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Frostion
In reply to this post by Frostion
Just found the fix on the forum.
http://tripleadev.1671093.n2.nabble.com/270BC-updates-can-someone-make-a-relief-image-td7582022i80.html#a7585132

Cernel wrote
"Damage From Bombing Done To Units Instead Of Territories" must be true in order to have the "canProduceXUnits" working (otherwise, it will just produce by the production value of the relative territory)

        <property name="Damage From Bombing Done To Units Instead Of Territories" value="true" editable="false">
                <boolean/>
                </property>

Meaning that, if the above one is not true and you have <option name="canProduceXUnits" value="N"/>, any the territories with any of these factories will, instead, produce till its maximum placement (normally equal to the production value) (that can be higher or lower than N).
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Frostion
In reply to this post by Frostion
OK, I would appreciate help and ideas for the following:
On my map there are Castles, Battering-Rams and Siege-Towers.
The Castle gives 15 units +1D.
The Battering-Ram is at the moment like this…



This is the code:
Code wrote
        <attatchment name="unitAttatchment" attatchTo="Battering-Ram" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
            <option name="movement" value="1"/>
            <option name="transportCost" value="2"/>
        </attatchment>

        <attatchment name="supportAttachmentBattering-Ram" attatchTo="Castle" javaClass="games.strategy.triplea.attatchments.UnitSupportAttachment" type="unitType">
            <option name="unitType" value="Battering-Ram"/>
            <option name="faction" value="enemy"/>
            <option name="side" value="defence"/>
            <option name="dice" value="strength"/>
            <option name="bonus" value="8"/>
            <option name="number" value="1"/>
            <option name="bonusType" value="siege"/>
            <option name="players" value="Crowton:Lionia:Greenskins:Elves:Undead:Dwarves:AI"/>
            <option name="impArtTech" value="false"/>
        </attatchment>
My question is … what shall my Siege-Tower units do? I would like them to have another ability than the battering ram, and it should also only work when at an enemy castle. Any ideas?
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

panguitch
Well, ideally the battering ram would damage the castle, not the units "in" the castle. But that would require making the castle not be infrastructure, and then the AI will select it as a casualty (probably as the first casualty)... Yeah, been through that debate myself on my map...

(Unless you could make the ram be a bomber that damages the castle? I haven't done much with damageable infrastructure so I don't know if there's a way it could be used to approach this result.)

So accepting the way you've done the ram and wanting a different flavor for the siege tower, I'd say have the tower be infrastructure that gives a bonus to your attacking units. This makes a kind of sense: battering rams actively damage something. Towers don't, they just help the troops inflict their damage.

By the way, I like the visual aesthetics in the screenies you've posted. Not my strongest area, so I'm impressed.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Frostion
I will maybe try out the bomber attack thing. Sounds like a fun idea. Maybe it could end up disabling the castle’s +1 defense? simulating that the attackers run through the broken gates?

Right now I am triying something else out. I am messing around with both the ram and towers. But there is something I do not understand:

pact_of_steel_2 Support Attachments wrote
faction           values: "allied" or "enemy"
side               values: "offence" or "defence", support when attacking or defending, can be both (example: value="offence:defence"). The side the attached-to unit is on when giving this support.
dice              values: "strength" or "roll", may be a list of both
bonus            values: how much to add to strength or roll
number         values: how many units to be supported
bonusType     values: the name of the bonus, any string. any bonus with the same name will not stack, any bonus with a different name will stack
players          values: names of players in a list, if missing defaults to no players, and if no players it means this support will not be active at start of game (can be activated later by a trigger) (example: value="Germans:Italians")
impArtTech    values: "true" or "false", does this support get doubled by the improvedArtillery technology?
• How can I make a unit support BOTH extra rolls and ekstra strength on the dice. It says "may be a list of both."
Can anyone please show me by altering my battering-ram supportAttachment I posted in my previous post above?

• I also like the idea of the towers giving attack support to infantry units, or removing defense support from enemy castle dwellers, but how can I limit this to ONLY work when the towers are brought to an enemy castle? They should not do it in any other battle.



Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

panguitch
My guess is that you can have the numerical bonus be applied to both the number of dice and the number of rolls, something like this:

<option name="dice" value="strength:roll"/>

But that would be pretty inelegant. If you want to have a support affecting rolls and strength, you'd have much more flexibility if you created it as two different support types, even if they belong to the same supporting unit.

Yeah, having towers only provide support when in the presence of castles is tricky. Not sure how to do that other than flipping it like your ram and having the castle give support to the tower. But you wanted to do something different from the ram.

I wonder if there's a way to turn the ram and/or tower into a unit that gets AA-style fire against castles at the start of battle? Or give castles AA fire against towers and rams. So a castle gives rams/towers a support bonus, but also has a chance to shoot them down before battle begins? Kinda passive-aggressive.

Hopefully someone has a better idea.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Eschelon
The 'bomber idea' has been used on at least one other map for Siege equipment, and if I remember right also for Generals/heroes on at least one map.  The main downside of course is that said unit needs to 'fly home' afterwords.

That's the main downside (the need to land in a friendly territory afterwords).  I haven't been playing that close attention to recent tag changes, so I don't know if that has changed.

If I remember correctly, when I tried to come up with a solution for this a while back,  I tried adding the 'isstrategicbomber' tag to a land unit, without defining said unit as 'isair', and the game just laughed at me (I was trying to get my Onagers to attack cities).  It'd be pretty cool if you could assign that value (isstrategicbomber) to a land unit for bombing/attacking infrastructure purposes though!

Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Cernel
In reply to this post by Frostion
Hi Frostion.

My MEAD siege stuff was made way back when many of the stuff (like the ability of giving support to enemies) we have now existed only in the to-do list.

Anyway, I'm comfortable with it, and don't plan to change it.

It consists of only 2 units: the "castle" and the "towers"; the castle representing whatever defensive construct and the towers representing whatever siege engines.

The castle is an infrastructure capturable AA gun firing 5 shots at 50% before battle, against whatever units, but no more than 1 shot per attacking enemy unit (a dynamic similar to the AA gun of v5).

The towers is an infrastructure capturable 2 hitpoints unit.

Cost are 2 PUs for the castle and 3 PUs for the towers, plus 1 PUs Fuel cost (with no fuel costs, it would have cost 4 PUs); the castle takes 2 turns to build. Of course, you can pile up infinite quantities of castles in a same territory; because, why not?
Differently from all other purchasable units in game, except only the "building_castle" (which is the consumable needed to build the castle in 2 turns), castle and tower has no maintainment costs (all other units cost 1 PUs upkeep each turn).


                    <attatchment name="unitAttatchment" attatchTo="castle" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
                         <option name="movement" value="0"/>
                         <option name="isInfrastructure" value="true"/>
                         <option name="canProduceUnits" value="true"/>
                         <option name="canProduceXUnits" value="-1"/>
                {!-- Cernel: This was the configuration before adding the "industry" unit. --}
                         <option name="isConstruction" value="true"/>
                        <option name="constructionType" value="castle"/>
                        <option name="maxConstructionsPerTypePerTerr" value="10000"/>
                        <option name="constructionsPerTerrPerTypePerTurn" value="10000"/>
                {!-- Cernel: The following one has been triggered out and in at start game to allow for placing Castles with bid regardless of building_castles' presence (the same for "building_castle_2" and "building_castle_3"). --}
                                                <option name="consumesUnits" value="1:building_castle"/>
                {!-- Cernel: The following one is useless, as now, since all territories are valued 1 or more. --}
                         {!-- <option name="canOnlyBePlacedInTerritoryValuedAtX" value="1"/> --}
                         <option name="defense" value="0"/>
                         <option name="defenseRolls" value="1"/>
                         <option name="chooseBestRoll" value="false"/>
                         {!-- 1_7_0_1: <option name="defense" value="0"/> --}
                         <option name="attack" value="0"/>
                         <option name="maxRoundsAA" value="1"/>
                {!-- 1_7_0_1: Cernel: In the old engine there was not the "damageableAA" option; instead, default was damageable (two hits units not killed at first AA hit) if you were able to choose AA casualties and instantly killed if you were not (now default is always false). --}
                         {!-- 1_7_0_1: --} <option name="damageableAA" value="true"/> {!-- :1_7_0_1 --}
                         <option name="isAAforCombatOnly" value="true"/>
                         <option name="typeAA" value="castles"/>
                         <option name="targetsAA" value="towers:infantrymen:guardsmen:shieldsmen:marksmen:raiders:knights:towers_newbe:infantrymen_newbe:guardsmen_newbe:shieldsmen_newbe:marksmen_newbe:raiders_newbe:knights_newbe:marksmen_garrison"/>
                         <option name="maxAAattacks" value="5"/>
                         <option name="attackAA" value="6"/>
                         <option name="mayOverStackAA" value="false"/>
                                                <option name="canNotMoveDuringCombatMove" value="true"/>
                    </attatchment>

                    <attatchment name="unitAttatchment" attatchTo="towers" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
                         <option name="movement" value="1"/>
                         <option name="givesMovement" value="1:towers"/>
                         <option name="fuelCost" value="PUs" count="1"/>
                         <option name="isInfrastructure" value="true"/>
                         <option name="isSuicide" value="false"/>
                {!-- Cernel: At start game, a trigger will set attack to 1. The attack value equal to 1 is only meant to avoid the "horses" being excluded from combat, due to being an infrastructure at attack 0. The "supportAttachmentHorsesNotAttack", assigned to all players at the same time, reduces the attack to the correct value of 0. --}
                         <option name="attack" value="0"/>
                         <option name="defense" value="0"/>
                         {!-- 1_7_0_5: <option name="isTwoHit" value="true"/> --}
                         {!-- 1_8_0_0: --} <option name="hitPoints" value="2"/> {!-- :1_8_0_0 --}
                         <option name="transportCost" value="10"/>
                    </attatchment>

Despite the "canProduceUnits" thing, the Castle has no role in production: each territory can produce up to production value, regardless.

Hope this helps.

Cheers

castle

The above images were freely made by fans and modified by me. You can find the credits for the above images inside MEAD.
History plays dice
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Eschelon
Frostion,

Page 4 of the development thread of a map that I ended up setting aside (map was simply too big to be playable) has some interesting city upgrade ideas, plus ruins and monuments:

http://tripleadev.1671093.n2.nabble.com/Ancient-Empires-Age-Of-Iron-Work-In-Progress-td6958159i60.html

At the very least, I'd love to port these ideas over to a smaller map at some point, if I thought the AI could grasp the concept of buying and upgrading cities from villages to towns to cities.  Just mentioning this here as I'm still interested in better infrastructure AI logic at some point in the future.

BTW, the city upgrade thing works fine on the player end, but the AI's at the time weren't buying them.  This map would take weeks to play using the current HardAI (which would at least know what to do with the other units), so I'm not in any hurry to get back to it.  Plus, I'm still fine tuning 3rd Century BCE Wars, and a number of concepts/units are used in both maps so this other effort wasn't completely wasted.

Can't believe it's been over 4 years since I set Ancient Empires aside... wow time flies!
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Frostion
@Cernel
OK! That is a complex Tower/City system. I thought about trying out the AA thing, but it seemed to complex to code. After I have seen your code, I still think it is complex. Anyway, It is not a problem as I actually want to keep my map rules simple. Simple units, economy and territory effects (not too simple … but simple).
I just got to do a few more tweaks before releasing a beta … stay tuned!
• Hey! Will you share your 8 or 12 "Shield" dice pictures? They standard 1-6 dice with the 7 and 8 text are kind of lame.

@Eschelon
WOW! Thats a huge map! And 24 Empirers!
I can see that the “AI will not build city upgrade units” problem is an ancient problem. I currently got Village/Town/City units that the AI can’t upgrade. Crossing fingers for a fix . However, I don’t think it is vital for the AI to be able to do this on my map to win over a human player.
Just questions regarding Age Of Iron, Eschelon:
• Didn’t you have a problems with the nations ending up with too many PUs or too many units? On my Dragon War map, when I see the 6 nations reaching like 100 units each, I think it is a lot of units.

@all
Help! I haven’t tried it yet, but is it possible to replace all the text that say “PUs” in the map files with something like “Coins” or “Gold”, and still have the map working? Or must I replace all territory production and unit cost with a new custom resource with these names? And what about the “PUs” folder and pictures? Can they be renamed or used somehow?
Reply | Threaded
Open this post in threaded view
|

Re: Map making questions

Frostion
In reply to this post by Frostion
OK, I got a new question that I hope someone can answer (besides the old PU question ):

• I want some units, owned by the same player, to never meet up in the same territory. Is there a way to prevent specific unit types from entering the same combat area as other specific unit types? … Thereby actually preventing them from combat moving / non-combat moving into the same territory and meeting up?

• PU question: Is it possible to replace all the text that say “PUs” in the map files with something like “Coins” or “Gold”, and still have the map working? Or must I replace all territory production and unit cost with a new custom resource with these names? And what about the “PUs” folder and pictures? Can they be renamed or used somehow?
12