blockades

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

blockades

squid_daddy
This post was updated on .
just doin a quickie here. blockading zones to reduce PU's

heres the thing. what is the definition of a warship?
things that aren't transports doesn't suffice, as battleships might be transports.
is there already something built in for this I can't find?

this is ready do go in as soon as I can resolve this issue.
Reply | Threaded
Open this post in threaded view
|

Re: blockades

ComradeKev
Administrator
Probably attack >0.  There may be a property that allows subs to also blockade... if there isn't one, there probably should be.
If emailing me at ComradeKev at yahoo.com , please add TripleA to the subject line
Reply | Threaded
Open this post in threaded view
|

Re: blockades

Veqryn
Administrator
In reply to this post by squid_daddy
Well, we have 2 versions already coded, and 1 version not coded at all yet (pacific 1940 needs to be coded still, very important).

Already done:
1) Convoy Zones = A sea territory with a PU value.  If you are the original owner, and you control it, you gain X PU's.  If your enemy comes and takes it away from you (using any ship that can't transport)(so it is now 'controlled' by someone else), then you do not get the income, and neither do they get any income.  Convoy Zones can't be "taken", only "denied", as the money sinks to the bottom of the ocean.  

2) Convoy Routes = A sea territory that is Assigned to a Land territory (can have a PU value or No pu value [usually no value]).  Both the sea territory AND the land territory MUST be controlled by the same player in order to get the income from both territories.  If you control one but not the other, you get no income.  If a Land territory has more than 1 sea territory assigned to it, then you get the income from the land as long as you control at least 1 of those sea territories.  [a small bug in that convoy routes that start out neutral never provide income after being captured].

Not done:
3) Pacific 1940 Convoy's.  Or as you may want to call it, "blockade zones".  These are sea territories that border a land territory.  If there is an enemy warship there, all touching land territories that are controlled by you produce 1 less income (can't go less than zero).  If that enemy warship is a submarine, the production goes down by 2 per touching/connecting land territory.  

I would honestly say that this new "blockade zone" is just ripe for being extensible.  Why should we force people to go by those rules?  Let them customize!
Here is what I am thinking:
Let this be a unit attachment (and obviously a territory attachment, to decide which zones can be blockaded and which can not).
                <attatchment name="unitAttatchment" attatchTo="battleship" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
                         <option name="blockade" value="2"/>

and allow this to be any value between Zero and 1000 or w/e.  

let the map maker decide.  rather than restrict people to rules like positive attack, etc.  maybe i want to make a map where there is a special blockade boat with no attack value, just made for blockading, etc.  Or maybe I think the game would be more balanced if submarines blockaded at 3 instead of 2.  etc.


thanks,
veqryn

ps to kev, yes there is a property for this:
                               
                                <property name="Sub Control Sea Zone Restricted" value="true" editable="false">
                                                <boolean/>
                                </property>


it is false, or should be false, in most maps,... but for some reason someone added it to most maps in 1.1.0.0 as true.  w/e
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: blockades

squid_daddy
yep ok sweet i'll add the unit attachment, easy solution.
i'll submit later. no time just now.

on a side note, suggestions for next thing that we need. rather pick up the easy ones first.
so don't suggest any war declaration nonsense ;)
Reply | Threaded
Open this post in threaded view
|

Re: blockades

squid_daddy
In reply to this post by squid_daddy
this is submitted.
one thing to note, territory attachments default to PU=2
if a sea zone has a PU>0 then it is assumed to be one of the other types of convoy zones
and displays the territory owners flag.
so set production to 0 to avoid this.

if someone wants to display blockades by icon rather than map tile
then the file to modify is 'IDrawable.java'
relevent TA method is 'isBlockade'

usage :

<attatchment name="territoryAttatchment" attatchTo="27 Sea Zone" javaClass="games.strategy.triplea.attatchments.TerritoryAttachment" type="territory">
                        <option name="blockade" value="true"/>
</attatchment>

sets territory to be blockadable

<attatchment name="unitAttatchment" attatchTo="submarine" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
                         <option name="movement" value="2"/>
                         <option name="attack" value="2"/>
                         <option name="defense" value="1"/>
                         <option name="isSea" value="true"/>
                         <option name="isSub" value="true"/>
                         <option name="blockade" value="2"/>
</attatchment>

sets sub to remove 2 production when sitting on a blockade.
Reply | Threaded
Open this post in threaded view
|

Re: blockades

Veqryn
Administrator
sweet

i will email kev and ask him what files he is working on, and see if I can commit some of your patches, that it isn't all on kev's head.

we should probably release an unstable version of triplea very very soon, because we have had a lot of changes since the last release.  without getting an unstable out, and getting user's finding our bugs, it is quite possible we will continue building and make it very difficult to test our work.
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: blockades

Veqryn
Administrator
In reply to this post by squid_daddy
Applied, though i changed your unused hashset to have a more descriptive name...

And I also changed the name of the territory attachment from blockade to blockadeZone (since before both unit and territory attachment had the same name, which could get a little confusing).

thanks a ton squid!
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: blockades

Veqryn
Administrator
In reply to this post by squid_daddy
blockades are not owned right?

i am reconsidering your idea of adding pictures again.

i've added a file to the "misc" folder of triplea called "blockade" and i think its a good idea to do the pictures for it now that i've seen blockades in action

Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: blockades

squid_daddy
yeah no owner. it just checks zones that contain the territory attachment property.
Reply | Threaded
Open this post in threaded view
|

Re: blockades

Veqryn
Administrator
Ok, i got the IDrawable.java to draw blockade zones, and along the way fixed a couple of things that greatly annoyed me as a map maker:

2 new txt files allowed:
convoy.txt
blockade.txt

format is the same as other txt files, and it allows you to move where the convoy or blockade image goes inside a territory
23 Sea Zone (709,292)

the default image for convoy's is the nation's medium sized flag

the default image for blockades is the blockade flag that now comes with TripleA
the blockade image can be changed by adding a new image to your map's misc folder called exactly "blockade.png"

I also fixed the bug where a convoy zone that was occupied territory displayed the wrong owner
and the bug where a convoy route was displayed as a convoy zone

i feel pretty happy about this, this is the first time i dicked around with displaying stuff and it worked perfectly

- veq



edit:

I am still annoyed by a couple of things, and I may need some pointers on how to resolve them.

1) I want to be able to specify new images for convoy zones/routes, but keep backwards compatibility in using the medium sized nation flag IF those new images are missing.  New image should be in the flags folder and called "<convoy owner's name>_convoy"

2) The text that pops up and says "Germans Convoy Center" or "Norway Convoy Route" is often in the wrong place, and I would like to know how to move it.  The ability to move the text might already exist, and if so I need to know how.  If not, I need to know how to make a way to move it.  Also, I would like a way to turn it off completely, in case i want to use decorations.

SGB, Kev, or Squid, can anyone enlighten me on these 2 questions?

thanks,
veqryn
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: blockades

squid_daddy
mm well for 1)
you could store a boolean in BlockadeZoneDrawable for wether the file exists or not.
and set it by doing a Try on mapData.getBlockadeImage() and catching the exception.

then when it comes to drawing you test to see if you should draw the blockade pic or
a player flag.

for 2)
not really a lot I can offer. other than the code is at IDrawable line 112

all it does is replace the normal name placement point with the convoy text.
so you either need to dick with the name placement file.
or add a special placement file for comments.
Reply | Threaded
Open this post in threaded view
|

Re: blockades

Veqryn
Administrator
done,

you can now use "Germans_convoy.png" for the german convoy symbol, and to activate it you need this in the map.properties file: map.useNation_convoyFlags=true

a fully complete map.properties now looks like this:



# POS2 by Veqryn
#    below is an example of all map properties possible

#Color settings for the map
#values must be a 6 digit hex number
color.British=996600
color.Americans=666600
color.Russians=993300
color.Germans=828282
#color.Germans=9C9C9C
color.Japanese=FFAB11
#color.Japanese=FF9900
color.Italians=23578C
#color.Italians=236B8E
color.Chinese=644664
color.Neutral=dd5500
color.Impassible=cc9933

units.scale=1
map.width=3500
map.height=2000
map.hasRelief=false
map.showCapitolMarkers=true

#use name_place.txt to change where the names of territories and convoys appear
map.showTerritoryNames=true
map.showConvoyNames=true

#defaults to false, if true you need <nation_name>_convoy.png, if false it uses the nation's normal flag
map.useNation_convoyFlags=true

#use to not draw the names of a list of territories, comma delimited
#dont_draw_territory_names=United Kingdom,Union of South Africa,Germany

# screenshot overlay stuff
screenshot.title.x=100
screenshot.title.y=50
screenshot.title.color=000000
screenshot.title.font.size=20
screenshot.stats.enabled=true
screenshot.stats.x=120
screenshot.stats.y=1800
screenshot.stats.text.color=000000
screenshot.stats.border.color=FFFFFF

#LINEAR_LIGHT: will make it look like night time, set it on 0.2f
#DIFFERENCE: similar to linear light
#MULTIPLY: similar to linear light
#OVERLAY: makes map darker and grittier looking, very cool, set it on 0.2f
#NORMAL: makes you able to see territory colors under the map reliefs. ugly but good for new players, set it on 0.1-0.3f

#does the map have blending modes
#map.mapBlends=false
#map.mapBlendMode=LINEAR_LIGHT
#map.mapBlendMode=DIFFERENCE
#map.mapBlendMode=MULTIPLY
#map.mapBlendMode=OVERLAY
#map.mapBlendMode=NORMAL
#map.mapBlendAlpha=0.3f
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html