• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Permanent corpses

Yes, I know THAT feeling, Cat <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
<!--QuoteBegin-Petros+Jul 13 2005, 01:49 AM--><div class='quotetop'>QUOTE(Petros @ Jul 13 2005, 01:49 AM)</div><div class='quotemain'><!--QuoteEBegin-->Not if you've seen a "Living Dead" movie or the "Thriller Video recently!
<div align="right">[snapback]123348[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
Ever seen the Hitchcock movie "Trouble with Harry", where the droll inhabitants of a serene(sic <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> ) New England hamlet desperately try to get rid of an incriminating corpse? Just like us... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" /> Yes, indeed! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />
 
Nathan recently raised the idea that NPCs should be kind of alarmed if they find a corpse. I could partly realise this: NPCs who walk around and stumble upon a corpse or a knocked out person now cry for guards and run away in panic. Looks better as if they stroll past completely unconcerned.
Not a perfect solution though: it doesn't work always (some people are just sooo inattentive ) and has no real gameplay effect yet (like starting a search for the murderer)
However, if you'd like to try or improve this, here is the code:

For the NPCs with LAi_citizen type (only the few citizens that Akella made) add six lines to LocAi\types\LAi_citizen.c like this:

if(CheckAttribute(by, "chr_ai.type"))
{
bool isDialog = false;
switch(by.chr_ai.type)
{
// ccc jul05 alarmed by bodies
case "stunned":
if(chr.sex == "man") {LAi_CharacterPlaySound(chr, "VOICE\Eng_m_a_067.wav")}
else{LAi_CharacterPlaySound(chr, "VOICE\Eng_f_c_016.wav")}
LAi_tmpl_afraid_SetAfraidCharacter(chr, by, true);
LAi_SetAfraidDead(chr);
break;
// ccc end

case LAI_TYPE_CITIZEN:
isDialog = true;
break;


For the LAi_patrol type (not only patrols but also most random VC characters) it wasn't quite as easy: couldn't use the already existing "FindNearCharacters" routine (my old problem of confusing indexes, references etc.), and had to set the NPC to LAi_citizen type. Otherwise the "run away" animation wouldn't play, probably it is immediately overruled by another AI update. Maybe someone can come up with a better solution. My changes to LAi_patrol.c :

float time = stf(chr.chr_ai.type.player) - dltTime;
chr.chr_ai.type.player = time;
if(time <= 0.0)
{

// ccc jul05 alarmed by bodies
int res = LAi_FindNearestVisCharacter(chr, 3);
ref by;
if(res != -1)
{
by = GetCharacter(res);
if(CheckAttribute(by, "chr_ai.type") && by.chr_ai.type=="stunned")
{
LAi_SetCitizenTypeNoGroup(chr);
if(chr.sex == "man") {LAi_CharacterPlaySound(chr, "VOICE\Eng_m_a_067.wav")}
else{LAi_CharacterPlaySound(chr, "VOICE\Eng_f_c_016.wav")}
LAi_tmpl_afraid_SetAfraidCharacter(chr, by, true);
LAi_SetAfraidDead(chr);
return;
}
}
// ccc end

//Àíàëèçèðóåì îêðóæàþùèõ ïåðñîíàæåé
int num = FindNearCharacters(chr, 3.0, -1.0, -1.0, 0.001, true, true);

<span style='color:red'>EDIT: Just realized that Nathan has made a modified LAI Citizen for the random citizens. So changing LAI_patrol type may not be necessary at all <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" /> </span>


BTW, using the "Ground_sitting" animation for merely stunned characters doesn't work for females. So we should either make a subcase "if stunned chr is female use "Lay_1" " or use "Lay_2" for dead and stunned alike.
 
Shooting past piles of corpses at characters behind is now possible. We can't change the hardcoded engine targetselection, but we can perform the shooting with other data than those yielded by the original targeting process.
For that I split the LAi_CharacterFire() function. It now only gets the EventData from the original targeting process and passes them on if we don't correct them. We DO correct them if the original target is a corpse. In that case we check if there is someone else near the corpse and declare this bystander to be the new target.
One could do other corrections of the dumb hardcoded targeting. E.g. prevent allies or neutrals from being shot at (might be a spoiler though <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" /> ). Or make a sharpshooting function which let's you select a certain person as target <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" /> .

I moved most LAi_CharacterFire code into a new
LAi_CharacterFireExecute(attack, enemy, kDist, isFindedEnemy)

function, which executes the actual shooting, damage calculation, SWAK etc. The big advantage of making this a new function is that shooting can now also be executed from other functions, by code and not by engine. So we can make snipers, grenadiers or cannon or mine "characters" that fight by shooting only. Or let merchants pull the blunderbuss from under the counter... (Stay tuned <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/type_1.gif" style="vertical-align:middle" emoid=":nk" border="0" alt="type_1.gif" /> )

Here's LAi_events.c with the new Fire functions:
 
Hey! This sounds really great indeed. Thanks a lot CCC! Can't wait to see it in action. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" />
 
Oh wow, how did I miss this thread before? Friggin' awesome stuff, just got caught up. I haven't updated my Pieter's Modpack lately but this is in it right?

My own thoughts: If you could 'open' a living or dead character and get the item selection screen, does that mean you could also put things into their inventory... like a timebomb?

And could pickpocketing be made in such a way, that an attempt under normal means would only get one item or some money, but if the character has enough luck or maybe a special pickpocketing skill, then it would bring up the item selection - as if you had enough mad pickpocketing skillz to to just take your pick?
 
<!--QuoteBegin-alan_smithee+Aug 16 2005, 07:02 AM--><div class='quotetop'>QUOTE(alan_smithee @ Aug 16 2005, 07:02 AM)</div><div class='quotemain'><!--QuoteEBegin-->Oh wow, how did I miss this thread before? Friggin' awesome stuff, just got caught up. I haven't updated my Pieter's Modpack lately but this is in it right?
<div align="right">[snapback]128271[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
It sure is. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />

<!--QuoteBegin-alan_smithee+Aug 16 2005, 07:02 AM--><div class='quotetop'>QUOTE(alan_smithee @ Aug 16 2005, 07:02 AM)</div><div class='quotemain'><!--QuoteEBegin-->My own thoughts: If you could 'open' a living or dead character and get the item selection screen, does that mean you could also put things into their inventory... like a timebomb?
<div align="right">[snapback]128271[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
Whahaha! You really are pure, nasty, evil, aren't you? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
Fun idea, actually. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

<!--QuoteBegin-alan_smithee+Aug 16 2005, 07:02 AM--><div class='quotetop'>QUOTE(alan_smithee @ Aug 16 2005, 07:02 AM)</div><div class='quotemain'><!--QuoteEBegin-->And could pickpocketing be made in such a way, that an attempt under normal means would only get one item or some money, but if the character has enough luck or maybe a special pickpocketing skill, then it would bring up the item selection - as if you had enough mad pickpocketing skillz to to just take your pick?
<div align="right">[snapback]128271[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
I suppose that should be possible somehow. Just needs to be coded... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
Might indeed be a good idea. That would also solve the "loot-the-trader" bug/feature.
 
"Loot the trader" bug?

And yeah, basically pure evil. You ever play Metal Gear Solid, where you can slap a C4 explosive onto someone's back then run away and detonate it? Crazy fun.

I also wanted to make some timebomb scenario where you can plant them on a ship or fort, like in the chests, and then they'll blow up if you can get away in time...
 
<!--QuoteBegin-alan_smithee+Aug 16 2005, 11:13 PM--><div class='quotetop'>QUOTE(alan_smithee @ Aug 16 2005, 11:13 PM)</div><div class='quotemain'><!--QuoteEBegin-->"Loot the trader" bug?
<div align="right">[snapback]128324[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
If you first talk to a trader (so that he has items) and then kill him stun hin or otherwise try to rob him, you get to take all his money and items. That's quite a good way of getting rich in no-time. If you do this, though, four enemies from the Merchant Guild will be generated (most recent modpack) to try and kill you. Of course, it is STILL a quick way of getting rich in no-time.

<!--QuoteBegin-alan_smithee+Aug 16 2005, 11:13 PM--><div class='quotetop'>QUOTE(alan_smithee @ Aug 16 2005, 11:13 PM)</div><div class='quotemain'><!--QuoteEBegin-->And yeah, basically pure evil. You ever play Metal Gear Solid, where you can slap a C4 explosive onto someone's back then run away and detonate it? Crazy fun.
<div align="right">[snapback]128324[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
Nope; never played it. But, in Indiana Jones and the Infernal Machine, I had this crazy way of killing of enemy Russians. To kill them with you bare fists, you must knock them out twice. So i would knock them out once, then put a sort-of time-bomb on their back and when they'd start to wake again: BOOOOM! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/boom.gif" style="vertical-align:middle" emoid=":boom" border="0" alt="boom.gif" />
Please note: I'm not usually so evil. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

<!--QuoteBegin-alan_smithee+Aug 16 2005, 11:13 PM--><div class='quotetop'>QUOTE(alan_smithee @ Aug 16 2005, 11:13 PM)</div><div class='quotemain'><!--QuoteEBegin-->I also wanted to make some timebomb scenario where you can plant them on a ship or fort, like in the chests, and then they'll blow up if you can get away in time...
<div align="right">[snapback]128324[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
Once again: You're having some excellent ideas. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
BTW: You once had cobbled together a large ship to walk around in, hadn't you? With CCC making a half-working door to the gun deck from the tutorial cabin (look for the code at the bottom of QuestLocations.c), you reckon it would be possible to finish that as a mod? Also: In the A&M Mod, there are several great-looking new ship-locations which might be used. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
Sweet new ship locations... I haven't been keeping up with the A&M mod, though their site was the only place I could find a copy of Suraknar's TXconverter anymore. Where could I see pictures of it? And I'll see what I can do about finishing it; the only thing holding me back was not being able to figure out how to get in and out properly.

The trader thing sounds great, and I have always wondered why I could kill someone who obviously has a ton of stuff but not get any of it. Why do you say it's a bug tho?
 
It's still a bit too easy: slash a poor, defenceless streetmerchant, loot tons of stuff and run away before the "merchant guild" appears. Not much risk = not much fun!


Boopytrapped corpses? What a mean, wicked, blasphemous idea! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" /> I like it <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

Not that easy, though. Giving anything to the corpse would be a waste as the corpsecharacter is being cleared away after looting (unless one of Pieter's latest option changes that)
If you want to add a "timebomb" option you can best do that in corpse_dialog.c. That runs if you "talk" to a corpse. Right now it only opens the iteminterface for looting, but you could add "dialog"-options to choose looting or boobytrapping.


Do you already have a code for triggering timebombs? Wouldn't know how to do that. But cccfunctions.c includes an "explode" functions which would do all the exploding and hurting stuff.

And the upcoming "building" mod will include the code you'd need to place a mine which will explode if an NPC gets near.
 
<!--QuoteBegin-alan_smithee+Aug 17 2005, 07:10 PM--><div class='quotetop'>QUOTE(alan_smithee @ Aug 17 2005, 07:10 PM)</div><div class='quotemain'><!--QuoteEBegin-->Sweet new ship locations... I haven't been keeping up with the A&M mod, though their site was the only place I could find a copy of Suraknar's TXconverter anymore. Where could I see pictures of it? And I'll see what I can do about finishing it; the only thing holding me back was not being able to figure out how to get in and out properly.
<div align="right">[snapback]128363[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
Will be making you some pictures. There don't seem to be any pictures available of it yet. Getting out works fine with CCC's temporary door. (The code is in the modpack; just outcommented. Bottom of QuestLocations.c). That door points to the cannon deck. And that doesn't work fine, because, for some reason, you can't walk around there. But I bet you should be able to fix that. Just have the door point to the proper location or something.

<!--QuoteBegin-alan_smithee+Aug 17 2005, 07:10 PM--><div class='quotetop'>QUOTE(alan_smithee @ Aug 17 2005, 07:10 PM)</div><div class='quotemain'><!--QuoteEBegin-->The trader thing sounds great, and I have always wondered why I could kill someone who obviously has a ton of stuff but not get any of it. Why do you say it's a bug tho?
<div align="right">[snapback]128363[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
I called it the "That would also solve the "loot-the-trader" bug/feature". <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
But, like CCC says: It's too easy. I've got an idea though. Instead of enemies being generated at only one spot when you loot a trader, what about having them generated at more than one location. That would make things harder, wouldn't it?

<!--QuoteBegin-CouchcaptainCharles+Aug 18 2005, 11:36 AM--><div class='quotetop'>QUOTE(CouchcaptainCharles @ Aug 18 2005, 11:36 AM)</div><div class='quotemain'><!--QuoteEBegin-->Not that easy, though. Giving anything to the corpse would be a waste as the corpsecharacter is being cleared away after looting (unless one of Pieter's latest option changes that)
If you want to add a "timebomb" option you can best do that in corpse_dialog.c. That runs if you "talk" to a corpse. Right now it only opens the iteminterface for looting, but you could add "dialog"-options to choose looting or boobytrapping.
<div align="right">[snapback]128387[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
If you set CORPSEMODE to "2", the corpse will remain after looting. However: It has been said this causes trouble on boardings. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
I attached some pictures of the new A&M Mod locations. If you want, I can mail them to you. Or better: I'll upload them somewhere for you to download.
<span style='color:red'>Edit</span>: Required models and textures available <a href="http://pieter.creativelass.net/am_deck_locs.zip" target="_blank">here</a>. (13,4 MB)
I hope you'll be able to do something nice with this. I can't wait to have those great ship-locations used in-game. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Awesome, I'm downloading the new deck now to take an in-depth look-see. It looks good in the photos, thanks for posting those.

And it was not just corpses I was thinking of planting bombs on... what about live people? I only had the thought because of the prospect of an items screen coming up upon trying to loot them.

*edit* Holy freaking crap these are phenomenal! I just got a good look at the three decks in GMviewer and I'm mighty impressed. Locators and everything, and they change by night and day, unbelieveable! Can't wait to get these into the game. I just have to figure out where exactly they go in the scheme of the ship. With what I had designed, which included things like a larder and mess-hall and so on, I just used regular town locations... these are much better.

We'll have to get them populated too, with guests in the allied ships you can hopefully someday visit, and so on.
 
GAWD I wish I had more time for this! I am glad to see someone working on it! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" /> When I stop being so darned busy I'll be back and hope to see some progress - this is awesome! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/danse1.gif" style="vertical-align:middle" emoid=":dance" border="0" alt="danse1.gif" />
 
Back
Top