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 previous message
Flugente

 
Messages:3461
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



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New feature: enemy helicopters
Next Topic: New Feature: ballistic shields
Goto Forum:
  


Current Time: Mon Sep 16 01:32:31 EEST 2019

Total time taken to generate the page: 0.01817 seconds