• 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

CouchcaptainCharles

COO (Chief Oddity Officer)
Storm Modder
Pirate Legend
I am really no fan of splatter, blood and gore, but that the PotC corpses dissolve into vapour after some seconds doesn't seem appropriate to me either. The remains of the victims IMHO enhance the serene atmoshpere of a battleground or crime scene.

You can keep corpses permanantly in the scene by outcommenting just one line in Loc_ai\LAi_events:


#event_handler("LAi_event_Character_Dead", "LAi_Character_Dead_Event");
void LAi_Character_Dead_Event()
{
aref chr = GetEventData();
// ccc to keep bodies in scene outcomment this: CharacterExitFromLocation(chr);
}
 
Hmm. I thought this was already done....(check)
Guess not. Coulda _sworn_ it was. Weird.
Thanks, CCC!

Whatcha think about replacing the whole makedead thing with keeping them alive as a corpse, so we can use the dialog interface for searching corpse?
(It seems this was Akella's intent, per enc_dead dialog). The A&M mod may do this as well.
 
Hear, hear, CCC! It can make for a good atmosphere, though... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_eek.gif" style="vertical-align:middle" emoid=":shock:" border="0" alt="icon_eek.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/sick.gif" style="vertical-align:middle" emoid=":eww" border="0" alt="sick.gif" />

Good thinking, Nathan - I do hate just getting "all" their junk without being able to choose! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> Will we still be able to "run through" them when they are corpses? Because sometimes those bodies stack up kinda high when you're fighting in a tight spaced environment like the catacombs or caves or dungeons or sewers (hey <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" /> can we "flood" the sewers?)... If you can't walk through them, then you're stuck. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" />
 
Hmm, that's an interesting point--danger--to making corpses dialogable.

What we really need is a way to add locators in realtime. Then we can just convert each corspe to a box locator and use itemsbox.

Actually...we could sorta fake it...use the way fleets work for characters. Divide the location up into zones, and grab pchar's current zone once per second or so (maybe more unless speed's an issue). Then, on death, assign "ransackable corpse" with the dead char's ID to the appropriate gridbox.
Then in the get pchar gridbox check, we check if there are any actionable things stored in that gridbox.

Now, an alternate approach would be to automatically assign a grid of locators to each location via some script for the tool, but that might get in the way of /real/ locators...
No, actually they wouldn't because we wouldn't add them to player's grouptype (i.e. make the locators of type 'grid' and not run addlocatorgroup("grid") ), and then we only add the locator if there's a reason to use it (i.e. nearby corpse). That would avoid the manually checking of pchar location.

We could use this same system to implement light-based sneaking (IIRC I mentioned this a ways back in an email to you, CCC)--that is, assign each locator a brightness value, and modify the player's visibility towards NPCs based on the brightness value of the nearest locator.
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" /> Can we ransack POTIONS from these corpses?
 
First we should assign potions to NPCs.
But yeah, I mean to allow you to get a full list of the NPC's items and take any and all you want; and to be able to autogen any items for an NPC (i.e. jewelry/skillthings, potions, armor, the works).

This is already sorta done with the stun mod and its dialog (props to CCC and Pieter).
 
That would be very cool! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/cool.gif" style="vertical-align:middle" emoid="8)" border="0" alt="cool.gif" />
 
Very cool indeed! I presume that the by the next time we return to that location, the authorities will have cleaned up the corpses, right?

Although in the jungles where they might lay undiscovered for some time I wonder if we could use those old skelton models from the original game and just leave them there. Might add some nice atmosphere.

What do you think?
 
<!--QuoteBegin-Jason+Jul 2 2005, 03:19 PM--><div class='quotetop'>QUOTE(Jason @ Jul 2 2005, 03:19 PM)</div><div class='quotemain'><!--QuoteEBegin-->Although in the jungles where they might lay undiscovered for some time I wonder if we could use those old skelton models from the original game and just leave them there.  Might add some nice atmosphere.
<div align="right">[snapback]120627[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
Would be cool, I think. Only over time, the jungles would become graveyards. <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" />
 
Heh, I like the "atmospheric" idea of having skellies lying around, but yes, they will mount up, if not properly taken care of! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />
 
We'll probably need to increase the number of characters limit, unless we do the add grid locators thing so we can add geometry into locators rather than as characters and teleport to position.
 
<!--QuoteBegin-CatalinaThePirate+Jul 1 2005, 09:35 PM--><div class='quotetop'>QUOTE(CatalinaThePirate @ Jul 1 2005, 09:35 PM)</div><div class='quotemain'><!--QuoteEBegin--><img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> Will we still be able to "run through" them when they are corpses?  Because sometimes those bodies stack up kinda high when you're fighting in a tight spaced environment like the catacombs or caves or dungeons or sewers (hey <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" /> can we "flood" the sewers?)...  If you can't walk through them, then you're stuck.  <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" />
<div align="right">[snapback]120340[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->

Or ... this can provide another handy use for "sidestep" <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" />
 
BTW Language question: Is it appropriate to speak of "serene atmosphere" in connection with corpses on a battlefield? Or is serene more in the line of "idyllic"? In that case it is not QUITE what I mean....

The corpses that I littered around by deleting just that line do NOT obstruct your path, you can walk through them. And you can't "talk" to them or identify them with the "T" key.

It would indeed be great to replace the automatic plundering of the dead with a routine that would require you to walk to the corpse and actually search it. I already tried to keep not only the model but also the whole functioning character in the game by outcommenting parts of the LAi_Character_Dead_Process function, but a more thorough rewriting seems to be necessary.

As for the plundering interface, I noticed that unused "search the dead" dialog as well. Maybe Disney censored that feature <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> But I have another little tweak that might make a nice plundering interface:

I rewrote the SWAK stealing code (for the Thiefknife and stunned chars) so that a successful theft opens the "exchange items" interface. That way you can choose what you actually want to steal. And it gives us the possibilty to steal not only weapons and gold but also other items and treasures.

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    if( CheckAttribute(weapon, "steal" ) && !LAi_IsFightMode(enemy) )
    {

 if(rand(100)+sti(attack.skill.Sneak)>25      )
 {
     LaunchCharacterItemChange(enemy);    // ccc jun 05 stealinterface<!--c2--></div><!--ec2-->


In connection with that I gave some additional items to the random characters: bandits and soldiers carry additional SWAK weapons, women jewels, indians artefacts, merchants minerals, innkeepers potions... So that if you feel the urge for a certain item you could go-a-stealing, select the right victim and have a fair chance to get what you want.

I'll put the files into the cccXperiment FTP-folder
 
Or can I add little zip files here? That would be a great feature <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" /> (Oh, the wonders of modern technology <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" /> )

My codebase is probably outdated, so it may not work to copy the complete files into your folders. Instead I recommend that you cut and paste the codesections marked with the modtitle("jun05 stealinginterface" and "jun05 booty for stealing") It is not that much work, as I always try to keep my mods simple and compact <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
Serene is usually a description of someone (or some thing) unaffected by the world. Idyllic, with a slight connotation of spirituality, would be the closest synonym.
Well, tranquil is even closer perhaps, but again serene is sort of a 'step above' tranquil, that hint of zen, of Perfect Harmony.

"by outcommenting parts of the LAi_Character_Dead_Process"
That was my thought too. Set LAi_SetDeadType() or something--create it if we have to.
But using the search interface is even better than dialog, yes.

Best I can think of is create a list of all dead characters's indices and their positions. When PChar is within X units of one (do this check in PlayerType CharacterUpdate), allow opening of itemschange with that dead character. Because the char has not yet been overwritten (simply logged off), the portrait and items should still work.
-----
Excellent stuff with the adding items!
Using IT code and the skipequip flag, I'd like to eventually make that kind of stuff parametric rather than hardcoded "itemname"+rand() things. Best would be to use the randitems array so we can do straight rand() calls rather than paging through the whole items array multiple times.
 
How about "deathly quiet"? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

(sorry, I'm in a strange mood again today!) <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/slap.gif" style="vertical-align:middle" emoid=":slap" border="0" alt="slap.gif" />

I love the "stealing interface" idea! Very nice, CCC! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
<!--QuoteBegin-CatalinaThePirate+Jul 3 2005, 10:43 PM--><div class='quotetop'>QUOTE(CatalinaThePirate @ Jul 3 2005, 10:43 PM)</div><div class='quotemain'><!--QuoteEBegin-->How about "deathly quiet"?  <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

(sorry, I'm in a strange mood again today!) <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/slap.gif" style="vertical-align:middle" emoid=":slap" border="0" alt="slap.gif" /><div align="right">[snapback]121167[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
You're deadly serious about this, aren't you? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />

Neat idea, Couchie! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile2.gif" style="vertical-align:middle" emoid=":))" border="0" alt="smile2.gif" /> Er, CCC... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
About the stealing interface and stealing weapons:
- When using a Thief's Knife on my officers, I could loot them. Maybe that should be prevented to happen.
- I also wondered what the actual use is of a Thief's Knife now. When you use it on someone not in fightmode, you can steal their belongings. But once you used it once, the whole town will be in fightmode, so that you can only use the Thief's Knife once in the town, until you've gone and returned again. Not really what you want when you're planning on just acting the pickpocket. So could it be made so that you can use the Thief's Knife multiple times? Maybe add a chance that it isn't noticed? Or is that chance already there? If so, I must have missed that.
BTW: Maybe the pickpocket dialog option should also open up the trading interface. Or does it already do that?

About the itembox on dead bodies: It is possible to store the last x,y,z values of the enemy before dying, because it's also possible to store these coordinates when stunning them (for the stars effect). So would it be possible to store the last coordinates of the enemy before dying, then add a box locator to those coordinates? I don't know if this would work, but it is an idea. I would like the itembox on dead bodies; would be a more realistic loot-the-dead mod than the way it is now with the player automatically receiving the items.
 
<i>- When using a Thief's Knife on my officers, I could loot them. Maybe that should be prevented to happen.</i>
Yeah.
<i>- I also wondered what the actual use is of a Thief's Knife now. When you use it on someone not in fightmode, you can steal their belongings. But once you used it once, the whole town will be in fightmode, so that you can only use the Thief's Knife once in the town, until you've gone and returned again. Not really what you want when you're planning on just acting the pickpocket. So could it be made so that you can use the Thief's Knife multiple times? Maybe add a chance that it isn't noticed? Or is that chance already there? If so, I must have missed that.</i>

The item define for thief's knife also needs
itm.stealth = true;

for it to not raise alarm.

Re: Pickpocket--and actually the knife too--I'd suggest not using the itemsbox interface, because IMO you shouldn't get to steal everything from a person on doing that, just one item (i.e. you cut the sword sash, or the purse string, or whatever, but not all of them...)
But that's just IMO.

<i>About the itembox on dead bodies: It is possible to store the last x,y,z values of the enemy before dying, because it's also possible to store these coordinates when stunning them (for the stars effect). So would it be possible to store the last coordinates of the enemy before dying, then add a box locator to those coordinates? I don't know if this would work, but it is an idea. I would like the itembox on dead bodies; would be a more realistic loot-the-dead mod than the way it is now with the player automatically receiving the items. </i>

The problem is you can't, SFAIK, create locators with code--they have to be there in the model.
(Another way to do this--see the Perm. Corpses thread--is having an array of those coords stored, and doing x-times-per-second checks of pchar location vs. dead body locations to 'fake' the box-locator functionality...)
However, I should try just flat-up creating new locator attributes and seeing if I can...Maybe we'll be lucky. :}
 
Back
Top