Home » MODDING HQ 1.13 » Flugente's Magika Workshop » Expanded Feature: Fortifications revisited
Expanded Feature: Fortifications revisited[message #335557] Sun, 07 September 2014 00:51 Go to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
Expanded Feature: Fortifications revisited

Likely the most important feature of this year's summer convention, we (Smeagol, DepressivesBrot and myself) have improved the fortification feature.

The pure mechanics are the same - only this time, you can define via xml what you want to construct and what to deconstruct. You can pretty much create ANY structure the game knows. And I mean ANY.

A small demonstration in A9, Smeagols's AIMNAS:



  • The first xml, TableData/Items/StructureDeconstruct.xml, allows setting up what structures you want to pull down, how, and what you might get:
    ...
    <STRUCTURE><!-- wooden planks, medium -->
    	<usDeconstructItem>5832</usDeconstructItem>
    	<usItemToCreate>1544</usItemToCreate>
    	<usCreatedItemStatus>100</usCreatedItemStatus>
    	<szTileSetName>deb_02.sti</szTileSetName>
    	<allowedtile>1</allowedtile>
    	<allowedtile>2</allowedtile>
    </STRUCTURE>
    ...
    
    Read this as: if we have item #5832 (a shovel in AIMNAS) in our primary hand, then clicking on a structure of .sti library deb_02.sti which is tileset member 1 or 2 will destroy this structure and give us item #1544 (wooden planks, medium) with 100% status.
  • The second xml, TableData/Items/StructureConstruct.xml, allows setting up what structures we can create with items:
    ...
    <<STRUCTURE><!--wooden planks, medium 2x1 -->
    	<usCreationItem>1544</usCreationItem>
    	<usItemStatusLoss>100</usItemStatusLoss>
    	<szTileSetName>deb_02.sti</szTileSetName>
    	<northfacingtile>1</northfacingtile>
    	<southfacingtile>1</southfacingtile>
    	<eastfacingtile>2</eastfacingtile>
    	<westfacingtile>2</westfacingtile>
    </STRUCTURE>
    ...
    
    Read this as: if we have item #1544 in our primary hand (wooden planks, medium, sound familiar?), then we will build a structure of sti library deb_02.sti from this. If we face north or south doing so, we will build number 1 from that set, otherwise 2.

    Of course, in order for this to work, the map needs to have these sti sets. What we don't know we cannot build... Yes, I've tried getting rid of that (which would allow us to build anything anywhere), but that part of the code is so whack that it is on hold.
  • As AIMNAS was built with thing like this in mind, many of these constructions will work in all maps there. For example, you can now create earthwork in all maps with a simple shovel, as Smeagol made room for that in his tilesets. This is not possible in vanilla maps, so you'll need AIMNAS or a similarly advanced map mod to get the most out of this feature.
  • You can also create walls this way (not shown in the video, but it works). As deconstructing walls would allow a player to flatten an entire city right under the enemies eyes with just a spy and a shovel (I'm looking at you, Gorro!), I do not allow tearing down walls this way in the code.
  • As you can set up what you get depending on what direction you face, you can set up your fortifications very detailed.
  • Via <usCreatedItemStatus> and <usItemStatusLoss>, you can set up very detailed how much of your 'resource' is used. For example, the concertina I've used loses 1% per tile, thereby making constructions less of an item hassle.
  • For increased immersion, you can set up what items deconstruct what - so a hammer could be used for rocks, a shovel for earth, a wrench for machines, a wirecutter for concertina wire, an axe for trees... now your dreams of playing a lumberjack have come true! :axe:
  • The Items.xml ItemFlag values 2 (FULL_SANDBAG) and 8 (CONCERTINA) aren't use anymore. I'll likely reuse those numbers soon, so removing these numbers from your items won't hurt.
This feature is fully savegame compatible.
It has been added in r7491 an GameDir r2140. GameDir >= 2140 is required from now on du to the new xmls.

[Updated on: Sun, 26 July 2015 12:21]



Re: Expanded Feature: Fortifications revisited[message #335559] Sun, 07 September 2014 01:33 Go to previous messageGo to next message
Nasenbaer

 
Messages:36
Registered:July 2013
Location: Germany
This is absolutely gorgeous :--D You are grreat boys!
Re: Expanded Feature: Fortifications revisited[message #335560] Sun, 07 September 2014 01:38 Go to previous messageGo to next message
grim

 
Messages:297
Registered:July 2006
Location: France
Cheers! To you 3 and to the summer convention. This improved feature opens up a wide array of gameplay opportunities, impressive!
Re: Expanded Feature: Fortifications revisited[message #335571] Sun, 07 September 2014 11:14 Go to previous messageGo to next message
smeagol

 
Messages:2713
Registered:June 2008
Location: Bremen, Germany
Grim
Cheers! To you 3 and to the summer convention. This improved feature opens up a wide array of gameplay opportunities, impressive!


Well... maybe features like this will help make the convention 2015 as crowded as the previous three again. Smile


Re: Expanded Feature: Fortifications revisited[message #335577] Sun, 07 September 2014 12:27 Go to previous messageGo to next message
grim

 
Messages:297
Registered:July 2006
Location: France
One of many applications: Now we can have a full crafting system.
With TableData/Items/StructureDeconstruct.xml, we can gather the ressources from the environment.
With transforms and merges, we can shape/refine them into different materials.
With TableData/Items/StructureConstruct.xml, we can make some of the items placeble on the terrain.

EDIT: It could be interesting that the deconstructed tile be replaced by something (or nothing, as it is now), defined by xml (StructureDeconstruct.xml).
For example, a deconstructed tree with an axe becomes a log, or a mined rock with a pick stays a rock (the same or a smaller/different one, without the "ore"?)

[Updated on: Sun, 07 September 2014 13:00] by Moderator

Re: Expanded Feature: Fortifications revisited[message #335578] Sun, 07 September 2014 12:30 Go to previous messageGo to next message
fallschirmjager

 
Messages:42
Registered:June 2005
Location: Darwin, Australia

Oh hell yes.

This looks fantastic. The imagination of the community and talent of modders such as yourselves will never cease to amaze.
Re: Expanded Feature: Fortifications revisited[message #335579] Sun, 07 September 2014 12:59 Go to previous messageGo to next message
sevenfm

 
Messages:1378
Registered:December 2012
Location: Under the Mountain
Will it be possible to make window in a wooden wall with the axe or chainsaw?


Re: Expanded Feature: Fortifications revisited[message #335580] Sun, 07 September 2014 13:02 Go to previous messageGo to next message
grim

 
Messages:297
Registered:July 2006
Location: France
Sevenfm
Will it be possible to make window in a wooden wall with the axe or chainsaw?

Not like it is presented. However, see my suggestion in edit, if the deconstructed tile becomes something else, it could be possible.
Re: Expanded Feature: Fortifications revisited[message #335606] Sun, 07 September 2014 16:27 Go to previous messageGo to next message
silversurfer

 
Messages:2185
Registered:May 2009
Sevenfm
Will it be possible to make window in a wooden wall with the axe or chainsaw?

You can already do this by using TNT. Wink

Re: Expanded Feature: Fortifications revisited[message #335607] Sun, 07 September 2014 16:39 Go to previous messageGo to next message
Off_Topic

 
Messages:1052
Registered:January 2009
silversurfer
Sevenfm
Will it be possible to make window in a wooden wall with the axe or chainsaw?

You can already do this by using TNT. Wink


I nearly choked on my coffee reading that.


Re: Expanded Feature: Fortifications revisited[message #335608] Sun, 07 September 2014 16:47 Go to previous messageGo to next message
fallschirmjager

 
Messages:42
Registered:June 2005
Location: Darwin, Australia

I'm more of a "right now" sort of bloke and use my RPGs for instant daylight.
Re: Expanded Feature: Fortifications revisited[message #335611] Sun, 07 September 2014 17:28 Go to previous messageGo to next message
Chaos

 
Messages:19
Registered:March 2013
Location: Czech Republic
This is great feature! Thanks! I would come up with few superlatives, but my guess is they have all been used already, when describing one of your many additions to 1.13. Smile

I also have an idea about a possible improvement of this feature. It would be especially helpful in preventing exploits you mentioned (dismantling entire town in a matter of minutes, or constructing impenetrable defenses even though the enemy is virtually on your doorstep...). Certain tasks (like de/constructing a wall, it would have to be specified in the XML) could be performed only as an assignment (and therefore taking some time etc.). The one major problem I see here is how exactly would the player tell their mercs what should be built, and where. I think this would require the game to switch to tactical, and there the player would define what it is exactly they want (in a similar manner as shown on the video), but the actual changes to the map would be made only after the assignment is finished. I have absolutely no knowledge of JA2 source code, so it may be that this is quite easy to implemented, but it may also be insanely difficult.

[Updated on: Sun, 07 September 2014 17:29] by Moderator

Re: Expanded Feature: Fortifications revisited[message #335614] Sun, 07 September 2014 17:50 Go to previous messageGo to next message
smeagol

 
Messages:2713
Registered:June 2008
Location: Bremen, Germany
Grim
One of many applications: Now we can have a full crafting system.
With TableData/Items/StructureDeconstruct.xml, we can gather the ressources from the environment.
With transforms and merges, we can shape/refine them into different materials.
With TableData/Items/StructureConstruct.xml, we can make some of the items placeble on the terrain.

EDIT: It could be interesting that the deconstructed tile be replaced by something (or nothing, as it is now), defined by xml (StructureDeconstruct.xml).
For example, a deconstructed tree with an axe becomes a log, or a mined rock with a pick stays a rock (the same or a smaller/different one, without the "ore"?)


All subject to tileset limitations. So probably not at this point.


Re: Expanded Feature: Fortifications revisited[message #335615] Sun, 07 September 2014 17:54 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3776
Registered:July 2009
Grim
One of many applications: Now we can have a full crafting system.
With TableData/Items/StructureDeconstruct.xml, we can gather the ressources from the environment.
With transforms and merges, we can shape/refine them into different materials.
With TableData/Items/StructureConstruct.xml, we can make some of the items placeble on the terrain.

EDIT: It could be interesting that the deconstructed tile be replaced by something (or nothing, as it is now), defined by xml (StructureDeconstruct.xml).
For example, a deconstructed tree with an axe becomes a log, or a mined rock with a pick stays a rock (the same or a smaller/different one, without the "ore"?)
Mining rocks for ore? What's next, running a magically enchanted automining system on tofu?


Re: Expanded Feature: Fortifications revisited[message #335618] Sun, 07 September 2014 18:54 Go to previous messageGo to next message
grim

 
Messages:297
Registered:July 2006
Location: France
If you want to do a mod with that in mind, have fun Wink
It's up to people/modders to do what they want with the tools given to them.
Currently, if you go into the mines, you will find silver nuggets on the floor, and there are mine assignments. We're not that far.
And by the way, these were oly examples Wink
Re: Expanded Feature: Fortifications revisited[message #335848] Wed, 17 September 2014 05:11 Go to previous messageGo to next message
veedotja2

 
Messages:88
Registered:April 2012
Location: New York
DepressivesBrot
Grim
One of many applications: Now we can have a full crafting system.
With TableData/Items/StructureDeconstruct.xml, we can gather the ressources from the environment.
With transforms and merges, we can shape/refine them into different materials.
With TableData/Items/StructureConstruct.xml, we can make some of the items placeble on the terrain.

EDIT: It could be interesting that the deconstructed tile be replaced by something (or nothing, as it is now), defined by xml (StructureDeconstruct.xml).
For example, a deconstructed tree with an axe becomes a log, or a mined rock with a pick stays a rock (the same or a smaller/different one, without the "ore"?)
Mining rocks for ore? What's next, running a magically enchanted automining system on tofu?


What's next you say? A full JA2 implementation in Minecraft! We can farm enemy drops with pit traps! The Minecraft engine would certainly would make fortifications easier to build...

Just found your post from 9/2013 where you said something similar. Beat me to it.

[Updated on: Wed, 17 September 2014 05:12] by Moderator

Re: Expanded Feature: Fortifications revisited[message #335910] Thu, 18 September 2014 20:52 Go to previous messageGo to next message
bole

 
Messages:61
Registered:November 2002
Risking to sound rather daft, but how do we get this update?
Re: Expanded Feature: Fortifications revisited[message #335911] Thu, 18 September 2014 20:54 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
Use an SCI with a revision >= r7491. Current one is r7516, which fulfils that.


Re: Expanded Feature: Fortifications revisited[message #336096] Wed, 24 September 2014 16:44 Go to previous messageGo to next message
baroni

 
Messages:16
Registered:February 2008
Incredible feature. It works perfect with Wildfire 6.07 (base: r7516, gamedir 2145). Till now I have redone tilesets for all sectors to use sandbags and concentrina with shovel, so I can buid them anywhere Smile (but one disadvantage: I noticed thas winning of battles is now very easy)

[Updated on: Wed, 24 September 2014 16:47] by Moderator

Re: Expanded Feature: Fortifications revisited[message #336102] Wed, 24 September 2014 21:49 Go to previous messageGo to next message
yarco

 
Messages:29
Registered:October 2013
What about creating fortifications by enemy? Is it possible now? Sandbags only.
Re: Expanded Feature: Fortifications revisited[message #336103] Wed, 24 September 2014 22:46 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
@Baroni: Good to hear Wink
Yes, one can wall in the Ai if one wants - no way for me to discourage that (apart from all the work that requires). In AIMNAS one can create earth piles everywhere, and smeagol make sure that some of them are passable, which is a good way to remove that exploit.

@yarco: The building part itself would require AI adjustments that are relatively easy to make. There is, however, no 'build AI' - the AI wouldn't know when to build what, and frankly, neither would AI.


Re: Expanded Feature: Fortifications revisited[message #337300] Tue, 28 October 2014 18:20 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
it's is possible allow rotate of some objects like cars or sofa ?

For example if I want use sofa to block a door from enemy and need rotate
it to required position....


Thanks for big work !!!
Re: Expanded Feature: Fortifications revisited[message #337319] Tue, 28 October 2014 23:38 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
StructureConstruct.xml allows setting up what exact objects an be placed depending on the location you are facing - so yes, that is possible.


Re: Expanded Feature: Fortifications revisited[message #337323] Wed, 29 October 2014 01:22 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
Flugente
StructureConstruct.xml allows setting up what exact objects an be placed depending on the location you are facing - so yes, that is possible.


good !!

thanks !
Re: Expanded Feature: Fortifications revisited[message #337584] Thu, 06 November 2014 01:28 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010


==
it's possible paste sandbag or any other on the roof ?
Re: Expanded Feature: Fortifications revisited[message #337591] Thu, 06 November 2014 14:49 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
Due to internal code reasons, sandbags on the ground are different from sandbags on roofs, so no. This can be done, but I currently have no interest in doing so.


Re: Expanded Feature: Fortifications revisited[message #337607] Fri, 07 November 2014 00:29 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
ok ...
thanks ..
Re: Expanded Feature: Fortifications revisited[message #337772] Sun, 16 November 2014 11:54 Go to previous messageGo to next message
Neitronus

 
Messages:12
Registered:October 2014
Any guide to adopting any mappack for this feature?
Re: Expanded Feature: Fortifications revisited[message #337782] Sun, 16 November 2014 22:26 Go to previous messageGo to next message
Kirill_OverK

 
Messages:263
Registered:September 2010
aim-nas big maps ..


many time ago ... as I know ...
Re: Expanded Feature: Fortifications revisited[message #340824 is a reply to message #337782] Fri, 01 May 2015 14:37 Go to previous messageGo to next message
smeagol

 
Messages:2713
Registered:June 2008
Location: Bremen, Germany
A new idea regarding fortifications:

I konw that I highly advocated a "place fortifications only if no enemies around in order to avoid exploits" policy. But, I have rethought this... I still think that some fortifications (like sandbags, piles of earth, concertina) should not be placeable when enemies are around, but certain others (like tires, roadblocks, oil drums, wooden barricades) should.

How about adding an xml tag "can be deconstructed during combat mode" and "can be constructed during combat mode" to the deconstruction and construction xmls?


Re: Expanded Feature: Fortifications revisited[message #341865 is a reply to message #340824] Sun, 26 July 2015 12:47 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
Fix in r7938: constructing/deconstructing a fortification only worked if the tileset was part of the additional tileset, not if it was a part of GENERIC 1.

The fact that nobody spotted this for almost an entire year makes me wonder whether anybody has even tried this out, tbh speechless

[Updated on: Sun, 26 July 2015 12:47]




Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Expanded Feature: Fortifications revisited[message #341868 is a reply to message #341865] Sun, 26 July 2015 21:50 Go to previous messageGo to next message
smeagol

 
Messages:2713
Registered:June 2008
Location: Bremen, Germany
Actually... I pointed it out, but you didn't care... why do you think I added sandbags, concertina wire and so on to each and every tileset?


Re: Expanded Feature: Fortifications revisited[message #341869 is a reply to message #341868] Sun, 26 July 2015 23:05 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
Uh-oh. I guess that makes me look pretty stupid right now. eek



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Expanded Feature: Fortifications revisited[message #341870 is a reply to message #335557] Sun, 26 July 2015 23:35 Go to previous messageGo to next message
NewAgeOfPower

 
Messages:107
Registered:June 2010
I mean, it worked, so...
Re: Expanded Feature: Fortifications revisited[message #341918 is a reply to message #335557] Fri, 31 July 2015 15:03 Go to previous messageGo to next message
UnholyAngel
Messages:6
Registered:June 2014
Does this mean that I can now actually build e.g. sand sacks in Drassen with the original maps?
Re: Expanded Feature: Fortifications revisited[message #341964 is a reply to message #341918] Tue, 04 August 2015 22:19 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
No. It simply means that you can build all structures in a maps tileset, not those added to the tileset that shadow others in GENERIC 1. Or: You can now build anything from GENERIC 1 that isn't shadowed by the maps specific tileset.

If you don't know what a tileset is, this will likely not explain anything cheeky



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Expanded Feature: Fortifications revisited[message #342031 is a reply to message #341964] Mon, 10 August 2015 14:03 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
As the amnount of time I can currently spend on coding JA2 is severely limited, I plan to spend it doing rather small things for now, sometimes in preparation of upcoming features. One thing I want to do is to get rid of the 'empty sandbag' <-> 'full sandbag' mechanic. While filling sandbags before placing them is immersive, it doesn't add much 'value' to the game and is rather annoying. Idea is to get rid of the full sandbag item, and declare the empty sandbag to be a 'stack' of 100 sandbags. This would allow to create 100 sandbag tiles via constructing, and get those items back (1%) when deconstructing. As a result, sandbags aren't such a scarce resource (it's a friggin' bag). The 'sandbag-specific code will be deleted, because I want the 'construction'-code to be simpler (before I make it more complicated again in an upcoming feature).

Unless there are justified objections, I will do that when I have the time.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Expanded Feature: Fortifications revisited[message #342034 is a reply to message #342031] Mon, 10 August 2015 14:32 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3776
Registered:July 2009
Make it 10 like the concertina, 100 would be an impractically large wad of cloth.



Chat with us!
#bearpit on IRC
Discord
Get your latest 1.13 Builds
(Pls don't use my forum PMs for general game queries)


Re: Expanded Feature: Fortifications revisited[message #342038 is a reply to message #342034] Mon, 10 August 2015 21:57 Go to previous messageGo to next message
silversurfer

 
Messages:2185
Registered:May 2009
I like the filled sandbags. I use them for bodybuilding.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Expanded Feature: Fortifications revisited[message #342069 is a reply to message #342038] Thu, 13 August 2015 00:12 Go to previous messageGo to previous message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
As announced, sandbags no longer need to be filled as of r7968 & GameDir r2269.
  • Sandbags no longer need to be filled, item #1541 has been removed.
  • Empty sandbags (#1540) are now a 'stack' of bags that can be used to create 100 sandbag structures and can be merged. As a result sandbags are no longer so scarce, as one 15-item delivery from BR should be enough for quite a few barriers cheeky
  • Item flags 1 and 4 (EMPTY_SANDBAG and SHOVEL) are no longer used.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Previous Topic: New feature: enemy helicopters
Next Topic: New feature: Constructable static fortifications (sandbags etc.)
Goto Forum:
  


Current Time: Tue Nov 21 08:24:19 EET 2017

Total time taken to generate the page: 0.01166 seconds