Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: Constructable static fortifications (sandbags etc.)
New feature: Constructable static fortifications (sandbags etc.)[message #305783] Sun, 10 June 2012 01:15 Go to next message
Flugente

 
Messages:3307
Registered:April 2009
Location: Germany
Constructable static fortifications

I made some code changes that now allow us to construct fortifications that will stay on the map and act just like your normal map structures.

  • Take an empty sandbag (item 1540) and a shovel (item 1015) in your hands. Click on the floor next to you. If this can fill your sandbag (earth, grass, sand), you will now get a full sandbag (item 1541). If this seems unsuccesful, try moving your window, due to a graphic glitch the item has to be redrawn to be seen.
  • click (with the sandbag in your hand) on the floor. If you see a moving hammer, you can build something. If the hammer is red, you can't (because there is something else there, you are on the roof etc.)
  • You can build sandbag barriers this way, they act like your normal barriers.
  • you can also build concertina wire by placing a concertina stack (item 1542)
  • You can now remove a sandbag barrier if you have a shovel in your hands. Attention: Because of this, the shovel no longer works as a melee weapon.
  • IMPORTANT: This will only work in a map if the map's tileset has sandbags/concertina wire in it. Otherwise you will get a message that this fortification cant be built here. No way around that.
  • For demonstration reasons, Fidel now DOES bring shovel. And bags.

Some demonstration pics:

http://i48.tinypic.com/30xd0eo.jpg
Trevor wants to fill a sandbag with his shovel...

http://i49.tinypic.com/2vlw8es.jpg
A full sandbag can be transformed back to an empty one by dumping it's content

http://i48.tinypic.com/2en4z1x.jpg
With a few clicks, Trevor built a makeshift barricade, an now mounts his weapon on it

http://i50.tinypic.com/2e0r4ly.jpg
Armed with his trusty shovel, Trevor flattens the Omerta sandbag barrier

I will sent this to RoWa in a few minutes, expect to find this soon in everybody's favourite trunk.

Note that in order to create a full sandbag, the game must know its item number (unless I loop over all possible 16k items and look... which I'd rather not). If you want to use this feature with your custom xmls, I'd advise you to either a) make your full sandbag item 1541 or b) tell me which number I should use (I will do this for mods, like AIMNAS, but not for just single persons).

Also, something of interest for those dealing with xmls:

I added a new flagmask for Items, because I was tired of always adding new booleans, and the huge mess that created in xmls. I have therefor built a new flag mask. Usage is xxx in Items.xml. It's a god old UINT32.

This is not to be confused with the AttachmentClass. This new flag is there to determine if an item has certain other properties. For now, the following flags exist (see in ItemTypes.h):

#define EMPTY_SANDBAG			0x00000001	//1 - item is an empty sandbag
#define FULL_SANDBAG			0x00000002	//2 - item is a full sandbag
#define SHOVEL				0x00000004	//4 - item is a shovel
#define CONCERTINA			0x00000008	//8 - item is a concertina stack



[Updated on: Tue, 12 June 2012 02:38] by Moderator



Re: New feature: Constructable static fortifications (sandbags etc.)[message #305784] Sun, 10 June 2012 01:36 Go to previous messageGo to next message
Tao

 
Messages:2140
Registered:August 2009
Location: The Known Universe
Whoah....

You work fast.
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305786] Sun, 10 June 2012 01:58 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:637
Registered:July 2005
Location: Canada
Quote:
IMPORTANT: This will only work in a map if the map's tileset has sandbags/concertina wire in it. Otherwise you will get a message that this fortification cant be built here. No way around that.


We could maybe use XML tilesets and add the missing tiles to the common section at the top, and then add some new tileset numbers for them in the code. But it would probably break big maps or something Razz


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305787] Sun, 10 June 2012 02:27 Go to previous messageGo to next message
Soto Banaris

 
Messages:130
Registered:May 2012
Location: Germany
You know what this map needs? Needs more sandbags... Wink
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305788] Sun, 10 June 2012 03:07 Go to previous messageGo to next message
Tao

 
Messages:2140
Registered:August 2009
Location: The Known Universe
F*** Bigmaps.

Said it from the beginning, nothing short of a hindrance.
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305789] Sun, 10 June 2012 03:22 Go to previous messageGo to next message
Marlboro Man

 
Messages:1262
Registered:October 2005
Location: USA
Very cool. Smile Now if tao will just start filling those bags we will have a fort up in no time. Wink


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305790] Sun, 10 June 2012 03:31 Go to previous messageGo to next message
Flugente

 
Messages:3307
Registered:April 2009
Location: Germany
This has nothing to do with wether a map is BigMaps or not...

Only if the sandbag.sti and spot_1.sti are among the tilesets used for the map, then sandbags/concertina wire can be placed.

If I understood Smeagol right, his maps always have the sandbag file, so his maps will propably all support this. So depending on the mapper, this will propably work better than in the classic maps.


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305791] Sun, 10 June 2012 03:54 Go to previous messageGo to next message
Tao

 
Messages:2140
Registered:August 2009
Location: The Known Universe
Marlboro Man
Now if tao will just start filling those bags we will have a fort up in no time. Wink


In real life = Reporting for duty sir!

In computer life = F*** Bigmaps

[Updated on: Sun, 10 June 2012 03:54] by Moderator

Re: New feature: Constructable static fortifications (sandbags etc.)[message #305794] Sun, 10 June 2012 07:30 Go to previous messageGo to next message
Wil473

 
Messages:2830
Registered:September 2004
Location: Canada
Madd Mugsy
Quote:
IMPORTANT: This will only work in a map if the map's tileset has sandbags/concertina wire in it. Otherwise you will get a message that this fortification cant be built here. No way around that.


We could maybe use XML tilesets and add the missing tiles to the common section at the top, and then add some new tileset numbers for them in the code. But it would probably break big maps or something Razz


If it is just a matter of adding a few lines to an XML file, I'm with Madd Mugsy on this one. Urban Chaos uses a custom tilset, that thanks to DepressivesBrot, I got it working with the ja2set.dat.xml this morning. Otherwise, my project would be missing out on this. I'm guessing that AIMNAS went with the XML Tileset weeks ago, as Smeagol was talking about some experiences with P4+ items graphics way back then. So, who else needs to make the move to the XML tileset? IoV/DBB are not messing with maps as far as I know, and Arulco Revisited seemed to be using stock tilesets.


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305795] Sun, 10 June 2012 09:03 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
wil473
If it is just a matter of adding a few lines to an XML file, I'm with Madd Mugsy on this one. Urban Chaos uses a custom tilset, that thanks to DepressivesBrot, I got it working with the ja2set.dat.xml this morning. Otherwise, my project would be missing out on this. I'm guessing that AIMNAS went with the XML Tileset weeks ago, as Smeagol was talking about some experiences with P4+ items graphics way back then. So, who else needs to make the move to the XML tileset? IoV/DBB are not messing with maps as far as I know, and Arulco Revisited seemed to be using stock tilesets.
Actually, he went back to binary after something with those XMLs wasn't working out and he was too fed up at the time to spend any length on fixing it.

And tao, stop being a dick by waving your illogic hate for BigMaps around at every opportunity. Some of us try to discuss ways to actually solve stuff.


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305796] Sun, 10 June 2012 10:15 Go to previous messageGo to next message
Gambigobilla

 
Messages:719
Registered:July 2008
How about preplaced wires and sandbags? Can i remove them too or i can only remove wires and sandbags placed by player?
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305800] Sun, 10 June 2012 11:59 Go to previous messageGo to next message
lockie

 
Messages:3944
Registered:February 2006
Location: Scotland
Tao , more talky , more sandbags fill with hot air , new item : Zepplins ! Very Happy


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305801] Sun, 10 June 2012 13:14 Go to previous messageGo to next message
Flugente

 
Messages:3307
Registered:April 2009
Location: Germany
I am unsure about what that XML tileset thingy is... it would propably best if you just tried this out with those maps. Wait until this is in the trunk and just try it out on those maps.

@Gambi: For the moment, there is no way of removing sandbags/concertina wire ingame, except the standard way: blow things up. I might add an action that allows the player to transform a sandbag barrier back to the sandbag item, but I'm still unsure wether this is a good idea.


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305802] Sun, 10 June 2012 14:20 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
Well, it would allow you to replenish your own stores at the expense of weakening the defense in that area. You still aren't generating defense works out of thin air so if it's not too complicated, tearing down would be nice.
As for wire, smeag allows the player to cut them with wirecutters just like regular fence, resulting in their destruction. Again, regaining a wire coil would just mean moving stuff from A to B, weaken one are to strengthen another.


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305804] Sun, 10 June 2012 14:42 Go to previous messageGo to next message
Soto Banaris

 
Messages:130
Registered:May 2012
Location: Germany
As far as I know, walls of sandbags stop you from climbing walls, creatures like Crepitus and bloodcats can't cross them and have to go around. I don't know for certain if zombies can. Haven't tested this yet. Anyway, being able to stop the enemy climbing on roofs I don't want him to without using blue flags is a step into the right direction.

There was a mapeditor mod for sandbags on roofs somewhere... I don't know for sure. May be interesting for this as well. I downloaded it but since I never play around in the mapeditor longer than a couple of minutes...
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305805] Sun, 10 June 2012 14:49 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
Just use the AIMNAS tileset if you need roofbags Soto, nothing special about the editor.


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305808] Sun, 10 June 2012 15:57 Go to previous messageGo to next message
Slax

 
Messages:1439
Registered:July 2006
Location: People riding polar bears...
What next? M-m-maybe mounted MGs?
I hope you realize, Flugente, that you're making a bunch of people very happy. Very Happy

Re: New feature: Constructable static fortifications (sandbags etc.)[message #305811] Sun, 10 June 2012 18:53 Go to previous messageGo to next message
AIM_Hero

 
Messages:9
Registered:August 2009
^No kidding. In fact, I was just mentioning this to my brother in the car this afternoon. "Hey wouldn't it be cool if JA2 allowed you to construct fortifications?"

I don't know how to thank you for your efforts, so here's a Youtube video of a cute hamster.

http://www.youtube.com/watch?v=7nhll1UslDg&feature=plcp
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305814] Sun, 10 June 2012 19:24 Go to previous messageGo to next message
lockie

 
Messages:3944
Registered:February 2006
Location: Scotland
Quote:
M-m-maybe mounted MGs?


Oooh yes , and , animations already exist !

[Updated on: Sun, 10 June 2012 19:24] by Moderator



Re: New feature: Constructable static fortifications (sandbags etc.)[message #305816] Sun, 10 June 2012 22:34 Go to previous messageGo to next message
Sam Hotte

 
Messages:2028
Registered:March 2009
Location: Middle of Germany
Great stuff! I'm envisioning Biff & co. building my own roadblocks with sandbags, barbed and trip wires ... Smile

On noting the misspelled 'weig_z_t lifting' in the sandbag's description in the screenie, a question comes to my mind:
Is digging dirt in the bag and/or placing a barrier consuming stamina and does it contribute to training of STR and Health?
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305822] Mon, 11 June 2012 00:09 Go to previous messageGo to next message
Flugente

 
Messages:3307
Registered:April 2009
Location: Germany
Update:

  • Corrected the spelling error (thanks for spotting that).
  • New action: With a shovel in your hand, you can now remove existing sandbag barriers. They will leave a full sandbag on the floor (So you can rebuild it if you want). However, the shovel cannot be used as a weapon anymore because of this. I guess thats fair. See the 4th picture for reference.
  • Sams's idea is pretty good, so now filling sandbags, placing or removing barriers will give you a little bit training for strength and health.

As this feature isn't in the trunk yet, I'll just add this to my existing patch for RoWa.


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305824] Mon, 11 June 2012 00:21 Go to previous messageGo to next message
PasHancock

 
Messages:738
Registered:February 2011
Location: Estonia,Tallinn
what new features awaits us in future?
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305826] Mon, 11 June 2012 00:32 Go to previous messageGo to next message
Flugente

 
Messages:3307
Registered:April 2009
Location: Germany
Telling you that would take away the surprise factor, wouldn't it? Very Happy


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305841] Mon, 11 June 2012 13:19 Go to previous messageGo to next message
Sam Hotte

 
Messages:2028
Registered:March 2009
Location: Middle of Germany
Praise and thx to Flugente! Smile

Another idea/question:
Is it possible to use this also for burrials: By using a shovel on a tile with dead/rotten body(-ies) on it you burry that corpse(s) (=make it/them disappear)?

For all of us who might dislike the crows and vomiting mercs ... Wink

(As a bonus, perhaps cleaning a sector of corpses could add to morale or loyalty?)
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305849] Mon, 11 June 2012 23:38 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
hi,
is this new feature committed to the svn?
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305850] Mon, 11 June 2012 23:43 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
Yes.


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305855] Tue, 12 June 2012 02:10 Go to previous messageGo to next message
Flugente

 
Messages:3307
Registered:April 2009
Location: Germany
@Sam: Removing the corpses would be easy. Won't be on my priority list though. Perhaps some day, when I feel like it (if you want to code it: all you have to do is to take a look at the code of fortifications, it would be done in the same way).


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305857] Tue, 12 June 2012 04:04 Go to previous messageGo to next message
Madd_Mugsy

 
Messages:637
Registered:July 2005
Location: Canada
Sam_Hotte
Praise and thx to Flugente! Smile

Another idea/question:
Is it possible to use this also for burrials: By using a shovel on a tile with dead/rotten body(-ies) on it you burry that corpse(s) (=make it/them disappear)?

For all of us who might dislike the crows and vomiting mercs ... Wink

(As a bonus, perhaps cleaning a sector of corpses could add to morale or loyalty?)


Now that we have zombies, perhaps we should allow cutting the heads off of all corpses as well, to prevent the zombies from rising?

(Seems like next in line after that would be piling up bodies to set them on fire...Razz)


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305859] Tue, 12 June 2012 06:21 Go to previous messageGo to next message
Soto Banaris

 
Messages:130
Registered:May 2012
Location: Germany
Madd Mugsy
Sam_Hotte
Praise and thx to Flugente! Smile

Another idea/question:
Is it possible to use this also for burrials: By using a shovel on a tile with dead/rotten body(-ies) on it you burry that corpse(s) (=make it/them disappear)?

For all of us who might dislike the crows and vomiting mercs ... Wink

(As a bonus, perhaps cleaning a sector of corpses could add to morale or loyalty?)


Now that we have zombies, perhaps we should allow cutting the heads off of all corpses as well, to prevent the zombies from rising?

(Seems like next in line after that would be piling up bodies to set them on fire...Razz)

Cutting off heads can be done already. All you need is a machete or cutlass.
Now a nice pile of bodies to burn in a crisp... That would be new and could have bad influence if you do it inside the cities. No one wants the children to watch this. Burying them would be at least respectful giving the locals the idea that you are someone to look up to.
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305863] Tue, 12 June 2012 10:17 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3805
Registered:July 2009
I'm not sure how respectful you'd find it if someone tore up the pavement in front of your door to bury a decapitated, bullet torn corpse. Piling them up on some square or just outside the city for a funeral pyre would be the 'better' option if you don't have the time or equipment for mass graves. Also, it's war, those children are hardened.


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305867] Tue, 12 June 2012 14:57 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
I'm definitely doing something wrong - fidel has a shovel and a sandbag in his hands but when i click next to him the hammer doesn't appear and i can't build anything. what could be the problem?
I'm in Omerta so the map has sandbags.
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305870] Tue, 12 June 2012 15:50 Go to previous messageGo to next message
afftor

 
Messages:13
Registered:October 2009
Sorry for asking, but where's that trunk exactly is?
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305875] Tue, 12 June 2012 17:51 Go to previous messageGo to next message
lockie

 
Messages:3944
Registered:February 2006
Location: Scotland
Haven't tried myself , but you might try the latest build in Depbrot's signature ..... http://tinyurl.com/cux34yk


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305876] Tue, 12 June 2012 17:54 Go to previous messageGo to next message
RoWa21

 
Messages:2049
Registered:October 2005
Location: Austria
Maalstroom
I'm definitely doing something wrong - fidel has a shovel and a sandbag in his hands but when i click next to him the hammer doesn't appear and i can't build anything. what could be the problem?
I'm in Omerta so the map has sandbags.


You have the latest GameDir files, but not the latest ja2.exe, so that feature will not work ...
I will update the EXE files in the SVN GameDir ...

[Updated on: Tue, 12 June 2012 17:56] by Moderator



Re: New feature: Constructable static fortifications (sandbags etc.)[message #305877] Tue, 12 June 2012 17:55 Go to previous messageGo to next message
lockie

 
Messages:3944
Registered:February 2006
Location: Scotland
Update SVN then . Razz


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305878] Tue, 12 June 2012 18:03 Go to previous messageGo to next message
RoWa21

 
Messages:2049
Registered:October 2005
Location: Austria
lockie
Update SVN then . Razz


Done Smile
New version: ja2_5343.exe


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305883] Tue, 12 June 2012 20:34 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
super!

the new feature works fine, unfortunately, now there is a problem with the aimming cursor.
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305892] Tue, 12 June 2012 22:09 Go to previous messageGo to next message
Flugente

 
Messages:3307
Registered:April 2009
Location: Germany
What problem with the cursor is there?


Re: New feature: Constructable static fortifications (sandbags etc.)[message #305898] Tue, 12 June 2012 23:33 Go to previous messageGo to next message
Maalstroom

 
Messages:343
Registered:December 2008
Location: en route to San Hermanos
it seems a little bit displaced to the upper left corner.
Re: New feature: Constructable static fortifications (sandbags etc.)[message #305899] Tue, 12 June 2012 23:36 Go to previous messageGo to previous message
Flugente

 
Messages:3307
Registered:April 2009
Location: Germany
If you mean that the hammer is moving a bit weird, I already commited a solution to that, should be in the trunk soon.


Previous Topic: Expanded Feature: Fortifications revisited
Next Topic: New feature: combat jeeps
Goto Forum:
  


Current Time: Mon May 21 10:08:09 EEST 2018

Total time taken to generate the page: 0.01701 seconds