Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: environment hazards
New feature: environment hazards[message #346073] Sun, 03 July 2016 23:49 Go to next message
Flugente

 
Messages:3389
Registered:April 2009
Location: Germany
Even though we spend a lot of gametime in the wilderness, there aren't that many 'natural' dangers our mercs face. Apart from packs of angry cats. And hunger. And disease. And harsh weather. Well, apart from all that.

Jagged Alliance 1 had the danger of snakes in the water that attacked careless mercenaries in the water - potentially instakilling them. So I want that too (apart from the instadeath part). So now that is a thing:


A new JA2_Options.ini value, ALLOW_SNAKES, controls whether snakes can attack you. Whether or not snakes are present in a sector is determined in SectorNames.xml:
...
<snakechance>
Value between 0 and 100. If > 0, snakes can attack people in water. The higher the value, the more frequent this happens.
...
<SECTOR>
    <SectorGrid>B15</SectorGrid>
    <szUnexploredName>Swamp</szUnexploredName>
    <szDetailedUnexploredName>Swamp</szDetailedUnexploredName>
    <szExploredName>Swamp</szExploredName>
    <szDetailedExploredName>Swamp</szDetailedExploredName>
    <sWaterType>1</sWaterType>
    <usNaturalDirt>500</usNaturalDirt>
    <rainchance>70</rainchance>
    <sandstormchance>0</sandstormchance>
    <snakechance>50</snakechance>
</SECTOR>
...


  • Snake attacks only happen in water. Technically, it doesn't matter whether this is a swamp, the ocean or a swimming pool, any source of water will do. For immersion reasons, I only added a positive chance to water sectors though.
  • Snakes will attack anybody, mercs, enemy soldiers, militia or civilians. Note that the attack chance is higher if a target is in deep water or bleeding.
  • Snakes can be evaded/killed/defeated. The chance is:

    • + 5% base chance
    • + SNAKE_EVADE_BONUS for those with the survival trait (see Skills_Settings.ini)
    • + 15% if soldier has a knife in inventory (+ 10% extra if knife is in a hand slot)
    • - 10% if in deep water, as the snake has more angles to attack from
  • Snakes are no 'actors'. They thus have no bodies and cannot be killed. Emptying your gun into the water is cute but useless.
  • Snake attacks can cause animal and swamp disease infections.
  • The animation (ominous water movement) was made by me. Yes, I am aware is is rather primitive. If you can do a better one, do so, otherwise shut it.
It is possible that mechanism will be expanded - technically, only lack of animation skills and sanity checks stop me from adding raving bands of squirrels, flocks of vampiric bats or graboids. If you don't know what graboids are, you are a sad, sad person.

This is fully savegame compatible.

This has been added to the trunk in r8266 & GameDir r2327. Using the new exe without the new Gamedir resources will cause 10% of Island's population to party in your living room.

[Updated on: Mon, 04 July 2016 00:11]




“What are you doing?” Joffrey interrupted him.

“… can’t a man give a few last words for his son to carry?”

“…Who told you your son was making it out of this field alive?”

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: New feature: environment hazards[message #346075 is a reply to message #346073] Mon, 04 July 2016 00:07 Go to previous messageGo to next message
Gambigobilla

 
Messages:717
Registered:July 2008
Nice feature. I've always missed the snakes from JA1. Too bad we don't have the animations JA1 has.

I understand emptying a gun into water is useless but maybe tossing some C4 would stun them.
Re: New feature: environment hazards[message #346113 is a reply to message #346075] Wed, 06 July 2016 01:01 Go to previous messageGo to next message
RunAwayScientist

 
Messages:85
Registered:September 2001

After initial play testing with this feature I've had to lower the 50 percent chance values added into SectorNames. Seems a bit excessive. Values <25 appear reasonable.


RIP Len, ambushed in the swamps by troops on either side while being bitten to death in shallow water. Gruesome.

Re: New feature: environment hazards[message #346118 is a reply to message #346113] Wed, 06 July 2016 19:33 Go to previous messageGo to next message
Flugente

 
Messages:3389
Registered:April 2009
Location: Germany
@Gambigobilla: snakes do not 'exist' as actors. That would require bodytypes and would be a huge, HUGE can of worms to open. Instead, every turn there is simply a chance that up to 3 'snake actions' happen. This can be either a merc being attacked, or the animation just playing in a random water location. The benefit is that this is really, really easy to do. However, your idea would require storing what location we bombed in the savegame, with decay values etc.... I'd rather not.

@RunAwayScientist: Yeah, I haven't that long with it. When I had it set to 25 and tried to do the video, nobody was attacked at all, so I increased the rate. Not sure what a good value is - I don't want swamps to be a death zone, but at the same time, I want snakes to be notable.



“What are you doing?” Joffrey interrupted him.

“… can’t a man give a few last words for his son to carry?”

“…Who told you your son was making it out of this field alive?”

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: New feature: environment hazards[message #346128 is a reply to message #346118] Thu, 07 July 2016 13:27 Go to previous messageGo to next message
smeagol

 
Messages:2710
Registered:June 2008
Location: Bremen, Germany
Would it be possible to make number of snake attacks random based on sector you're in as well?

Something like <max number of snake attacks per turn> 2d6 </> would be really cool (especially if adjustable for each sector). A swamp sector might have not only higher snake activity in general but also more snakes than a sector like Balime for example.

Don't know how or if random factors can be added to an xml... rolling different dice would be really nice, though.

[Updated on: Thu, 07 July 2016 13:27]



Re: New feature: environment hazards[message #346131 is a reply to message #346128] Thu, 07 July 2016 20:15 Go to previous messageGo to next message
Flugente

 
Messages:3389
Registered:April 2009
Location: Germany
Currently, <snakechance> is simply the chance that snakes will be active - this is rolled every turn. Having the number of snakes be random every turn would also work - though I think I might collect ideas here for a bit - I don't want to add tags that I then have to remove again.



“What are you doing?” Joffrey interrupted him.

“… can’t a man give a few last words for his son to carry?”

“…Who told you your son was making it out of this field alive?”

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: New feature: environment hazards[message #346132 is a reply to message #346131] Thu, 07 July 2016 21:00 Go to previous messageGo to next message
edmortimer

 
Messages:1065
Registered:January 2015
Location: Home Free
Quote:
Currently, <snakechance> is simply the chance that snakes will be active - this is rolled every turn. Having the number of snakes be random every turn would also work - though I think I might collect ideas here for a bit - I don't want to add tags that I then have to remove again.


Is it possible to have Elio kill the snakes as he did in Metavira? Maybe like a scout prevents Bloodcat ambushes?




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: New feature: environment hazards[message #346133 is a reply to message #346132] Thu, 07 July 2016 21:13 Go to previous messageGo to next message
Flugente

 
Messages:3389
Registered:April 2009
Location: Germany
Well, as said in the opening post, there is a chance to evade/kill/whatever the snakes and take no damage. No animations, though, as my animation skills are severly limited.



“What are you doing?” Joffrey interrupted him.

“… can’t a man give a few last words for his son to carry?”

“…Who told you your son was making it out of this field alive?”

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: New feature: environment hazards[message #346134 is a reply to message #346132] Thu, 07 July 2016 21:13 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3801
Registered:July 2009
Hmmm, would have to be some kind of 'Snake Warding Aura' tied to tribesmen and survivalist types of backgrounds.



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: New feature: environment hazards[message #346378 is a reply to message #346134] Wed, 27 July 2016 01:23 Go to previous messageGo to next message
Flugente

 
Messages:3389
Registered:April 2009
Location: Germany
As of r8277 & GameDir r2332, 2 new snake-related things:
  • A new tag, <numsnakes>, controls how many snakes are active at maximum whenever a snake attack happens (minimum is always 1, however). Valid values from 0 to 100 (though 0 doesn't make sense, and high values combined with high snake probability will make turn any water body into a Indiana Jones nightmare fuel dump).
    ...
    <SECTOR>
        <SectorGrid>B15</SectorGrid>
        <szUnexploredName>Swamp</szUnexploredName>
        <szDetailedUnexploredName>Swamp</szDetailedUnexploredName>
        <szExploredName>Swamp</szExploredName>
        <szDetailedExploredName>Swamp</szDetailedExploredName>
        <sWaterType>1</sWaterType>
        <usNaturalDirt>500</usNaturalDirt>
        <rainchance>70</rainchance>
        <sandstormchance>0</sandstormchance>
        <snakechance>50</snakechance>
        <numsnakes>7</numsnakes>
     </SECTOR>
    ...
    
  • A new background property increases snake evasion/defense:
    ...
    <snake_defense>0</snake_defense>				  <!-- +- % chance to evade snake attacks, -100 to 100 -->
    ...
    <!-- Elio -->
    <BACKGROUND>
    	<uiIndex>196</uiIndex>
    	<szName>Metaviran Native</szName>
    	<szShortName>Metavira</szShortName>
    	<szDescription>The indigenous people of Metavira have adjusted to the hostile 
    jungle there. After the liberation, some joined the foreigners, and sought their luck elsewhere.</szDescription>
    	<ap_urban>-3</ap_urban>
    	<ap_swamp>3</ap_swamp>
    	<ap_tropical>3</ap_tropical>
    	<ap_swimming>-10</ap_swimming>
    	<cth_blades>7</cth_blades>
    	<stealth>5</stealth>
    	<resistance_disease>20</resistance_disease>
    	<camo>5</camo>
    	<ambush_radius>20</ambush_radius>
    	<snake_defense>60</snake_defense>
    	<no_male>1</no_male>
    	<no_female>1</no_female>
    </BACKGROUND>
    ...
    
With a high enough value, you can become effectively immune to snake attacks. In stock, I've awarded this to Elio.



“What are you doing?” Joffrey interrupted him.

“… can’t a man give a few last words for his son to carry?”

“…Who told you your son was making it out of this field alive?”

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: New feature: environment hazards[message #347988 is a reply to message #346378] Tue, 03 January 2017 00:12 Go to previous message
Vincent J. Claymore

 
Messages:271
Registered:February 2011
My experience (after 2 or 3 battles in Swamp sectors) is that snake attacks happen too frequently. While they have never happened to any of my mercs (I never enter water tiles - why should I?) the enemy got attacked numerous times during every battle.
Previous Topic: New feature: overlapping SAM site coverage
Next Topic: New feature: Minigames
Goto Forum:
  


Current Time: Mon Aug 20 06:36:11 EEST 2018

Total time taken to generate the page: 0.00828 seconds