Having the bones ghosts look like the original characters

Feb 25, 2016, 5:32 am
#1
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
With a few odd changes, you can play as a ghost!
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Feb 25, 2016, 5:38 am
#2
Joined: Dec 11, 2008
Posts: 1,770
SPOOKY

This makes Kaethos' observation that your skin is white rather a lot more entertaining. Also pretty entertaining that he didn't notice he was raising a ghost.

EDIT: Does this preserve the original character's hair colour?
System would indicate in graphic if person is mounted on horse or not.
Same system also show if person mounted on boar, elephant, polar bear etc.
Or if person mounted on ass.
Ivan find mounting on ass funny.
Feb 25, 2016, 1:28 pm
#3
Joined: Apr 2, 2014
Occupation: Navastating
Location: Aslona
Posts: 764
So...

Will there be new player ghosts with equipment and attributes matching the deceased character?



Would be great!
Feb 26, 2016, 4:07 am
#4
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
red_kangaroo wrote
Will there be new player ghosts with equipment and attributes matching the deceased character?

I think that's the eventual goal. My usual first step before embarking on a change is to wreck the code to try to see if an idea will work.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 5, 2016, 2:56 am
#5
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
Made a bit of progress today. I delved into the code that creates undead configurations for zombies and skeletons, and our present day ghosts. I was able to use this to create humanoid style ghosts (provisionally called 'spirits', which will eventually just be known as ghosts), which preserve the bitmap positions of limbs, torsos and heads etc of the characters in the database that they are generated from.
I also found some machinery in the code that enables a maximum to be set on the alpha channel for bodyparts, meaning that I can cause the ghosts to have a certain transparency, and with the cloth colour set to a kind of gray, it makes a nice transparent fabric colour so the ghosts can still "wear" something. The skin colour is otherwise a very light blue tinge.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 5, 2016, 3:13 am
#6
Joined: Dec 11, 2008
Posts: 1,770
This looks pretty damn good I must say!
System would indicate in graphic if person is mounted on horse or not.
Same system also show if person mounted on boar, elephant, polar bear etc.
Or if person mounted on ass.
Ivan find mounting on ass funny.
Mar 13, 2016, 4:12 pm
#7
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
4zb4 wrote
LIVAN (CVS? Don't remember) already had something like that for the "derived undead", maybe you could appropriate it? Or have you looked at it and it's kludgy?
If it's a matter of not having the previous player's stats on hand, can't you just throw them into the bones file? I actually dunno if that's how it already works considering the ghosts seem to be of varying strength.

Just posting here to be tidy. CVS has the 'CreateUndeadConfigurations' system, so the current line of development also has this. I have used this very function to create the ghosts of characters you see in posts above. It is a really powerful way to create undead in a nicely efficient and randomized way.
Making a bones ghost is a process requiring specific, rather than generalised, info about the player. Luckily the game always spawns a ghost when the player dies. I just need to devise a way of telling how many limbs the player has left at the time of death... and some info about hair and eye colour etc. Configure the spawned ghost with this info and then viola, bones ghost.
My attempts so far have not turned up the desired results yet, and my latest thinking is that the bones ghost will need to be a derived class of a general ghost, only with some added functions and restrictions.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 13, 2016, 5:58 pm
#8
Joined: Dec 11, 2008
Posts: 1,770
fejoa wrote
I just need to devise a way of telling how many limbs the player has left at the time of death... and some info about hair and eye colour etc. Configure the spawned ghost with this info and then viola, bones ghost.
My attempts so far have not turned up the desired results yet, and my latest thinking is that the bones ghost will need to be a derived class of a general ghost, only with some added functions and restrictions.

Ohhh! I see the problem now.
Well, I think being able to tell whether they have limbs will be easy enough since here's functions for that already for checking, say, if you can equip a weapon. My dumb and simple solution would be to have this info saved into the bones file (e.g. hasLeftLeg = 1, hasRightArm = 0, hairColour = [RGB value/1 or 2 or 3 for the different saved colours]) so you can use that to generate the ghost later.

Not sure making a subclass of a general ghost will work because they're not humanoids.
As for the current playerkind ones, I'm not sure there's functions for hotswapping their hair colours (you could be lazy and just make it white) but we already have humanoids that can spawn without certain limbs - e.g. Hunters in Attnam are missing an arm.
Could be a place to start looking. I might take a look at it myself.


Quote
Luckily the game always spawns a ghost when the player dies.

It does? Literally the turn after the game ends before it goes back to the main menu? I didn't know this!
If that's the case couldn't you just make a clone (as in wand of cloning) of the player and set it to playerkind(GHOST) somehow? That would preserve their current limb status, and HOPEFULLY the ghost would immediately pick up and equip all the items in the death pile when you come across it in another run.

Really just throwing ideas around here.
System would indicate in graphic if person is mounted on horse or not.
Same system also show if person mounted on boar, elephant, polar bear etc.
Or if person mounted on ass.
Ivan find mounting on ass funny.
Mar 15, 2016, 5:56 am
#9
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
4zb4 wrote
Not sure making a subclass of a general ghost will work because they're not humanoids.
As for the current playerkind ones, I'm not sure there's functions for hotswapping their hair colours (you could be lazy and just make it white) but we already have humanoids that can spawn without certain limbs - e.g. Hunters in Attnam are missing an arm.
Could be a place to start looking. I might take a look at it myself.

Well, I meant the new humanoid ghosts will actually be the new generic ghosts, which spawn in these random configs, and then a bones ghost will be of a class derived from the new humanoid ghosts. They will only be spawned when the player dies, with information about limbs, hair and eye colour etc recorded and saved, in the way you mentioned.
It needs to be done this way, because the player looks different depending on int, wis and arm strength. The ghost needs to have its own functions for retrieving the bitmap positions of arms and head in the same way as the player character, to better reflect what the player from the bones file looked like.
Ultimately I'd like to do some really complicated stuff by recording armor and weapons and making ghost copies of these using ghost materials. The ghost items disappear when the ghost gets sucked into hell.
Also, if the player was decapitated, then the ghost should carry his head around.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 15, 2016, 6:03 am
#10
Joined: Dec 11, 2008
Posts: 1,770
Oh! I didn't realise that point about the generic ghosts, my bad. I also didn't consider the beard and arm growth.

On the topic of armor and weapons, this sounds like something you could accomplish by adding a CONFIG GHOSTLY for like... every weapon? Idk. I think it's possible to have a CONFIG as part of one of the overarching parent classes like weapon, liquid etc. so all its children inherit it.
Could just make the ghostly weapons have a counter like mirrored items and an opacity modifier for their sprite, and just have the counter jump to zero inside the ghost's death code for each piece of equipment?
foreach item equipped, ghostTimer=0 or so.

Quote
Also, if the player was decapitated, then the ghost should carry his head around.
I like the way you think. Can we force humanoids to prioritize certain equipment over others rather than the basic code which is "lemme pick up and use this because it has high stats"?
System would indicate in graphic if person is mounted on horse or not.
Same system also show if person mounted on boar, elephant, polar bear etc.
Or if person mounted on ass.
Ivan find mounting on ass funny.
Mar 25, 2016, 8:05 pm
#11
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
Ok, so here's the latest on this development front.

I battled the source trying to change the bone's ghost hair and eye color for two weeks, not realising that I was attempting this for a long time with uninitialized data. Sad but true.
The solution was this, which I am uneasy about, but should work as expected, as long as a bones ghost is not spawned elsewhere, which is impossible.

The main changes are:

Changed config "GHOST" gas type material colour to RGB(200, 200, 255).
Created a humanoid "bonesghost" which is a derived class of a humanoid spirit.
Game creates a bonesghost rather than a character::ghost.
Old-style nonhumanoid type ghosts can no longer be generated, but are still hanging out vestigally in the code.
SPOILER ALERT. Click here to see text.
Reinstated the function where the bonesghost hovering above its own corpse will be resurrected into a friendly bones pet when hit by a blast from a wand of resurrection.

Spirits do not pick up and equip gear and weapons.
SPOILER ALERT. Click here to see text.
Spirits cannot be polymorphed above 100 HP, as with first-generation ghosts from before.

Bonesghosts cannot be polymorphed.
Importantly, the bones ghost will retain the hair color, eye color, head and left/right arm bitmap positions, thereby retaining the appearance of the bone file player character.
Spirit limbs cannot be hacked off.
Spirit "touches" you, for now...
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 26, 2016, 11:44 am
#12
Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 2,299
Looks like this was merged into master, awesome! Can we get a new Windows release?
Mar 26, 2016, 1:37 pm
#13
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
capristo wrote
Looks like this was merged into master, awesome! Can we get a new Windows release?

It would make sense, three months since the last release and all. I'll get onto it today.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Sep 13, 2016, 5:16 pm
#14
Joined: Sep 22, 2008
Posts: 634
Found an issue with ghosts of foo:


Ghost limbs cannot be severed, so silly situations like this happen.
Sep 14, 2016, 5:16 am
#15
Joined: Dec 11, 2008
Posts: 1,770
Well, that makes it clear that the ghosts are very dead.
System would indicate in graphic if person is mounted on horse or not.
Same system also show if person mounted on boar, elephant, polar bear etc.
Or if person mounted on ass.
Ivan find mounting on ass funny.
Sep 14, 2016, 6:22 am
#16
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
You could say it negatively affects the game.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Sep 14, 2016, 6:35 am
#17
Master mine stomper


Joined: Dec 16, 2007
Occupation: Shoveling. But metal.
Location: Blazing in the steppes
Interests: Absolutely fuck-all.
Posts: 2,050
Ugh, I hate talking to the ghosts, they always have negative things to say about their health.
Sep 14, 2016, 6:35 am
#18
Joined: Sep 22, 2008
Posts: 634
Not to kill the puns, but I should probably clarify that this is after whacking the ghost with a WM-pumped character. The thing just refused to die, because all hits were aimed at limbs only.
Sep 14, 2016, 7:27 am
#19
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
The reason I made it so ghosts couldn't lose limbs is because it seemed odd to hack limbs off a ghost. Head, torso and groin are still vital on a ghost.

There are a number of possibilties:
1) Make ghost's limbs disappear when severed - most common behaviour for a few special humanoid characters
2) Make all of the ghost body parts vital - easier to one-hit a ghost
3) Redirect all the damage incurred on arms and legs etc to the torso - easier to land blows and probably kill the ghost faster
4) Leave it as it is, JoKe's WM-pumped character wasn't landing any body blows anyway.

Does it need to be fixed? Or is it a new and curious feature?
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Sep 14, 2016, 7:38 am
#20
Joined: Apr 9, 2016
Occupation: Priestx of Sophos
Location: Standing on a big mine in GC1
Interests: the relation of queer crystal hyperfeminism and amphibious neutronium cybersocialist art
Posts: 258
JoKe wrote
Not to kill the puns, but I should probably clarify that this is after whacking the ghost with a WM-pumped character. The thing just refused to die, because all hits were aimed at limbs only.
I've seen this outside of WM too. It was very mystifying. And bad for my health.
It definitely felt like a bug when I encountered it - I didn't report it on github because I wasn't sure how to reproduce it. Making limbs vital to a ghost seems a bit weird; making them disappear seems reasonable. Redirecting all limb damage to the torso seems a bit strange.
Perhaps there's some way for ghosts to keep all their limbs, but have them excluded from targeting when their hp is 0 or less?
Sep 14, 2016, 3:25 pm
#21
Joined: Dec 11, 2008
Posts: 1,770
I think making the limbs vanish when severed is a good idea, and it makes sense too.

...well as much as hacking away at an incorporeal being with a physical weapon does anyway.
System would indicate in graphic if person is mounted on horse or not.
Same system also show if person mounted on boar, elephant, polar bear etc.
Or if person mounted on ass.
Ivan find mounting on ass funny.
Sep 14, 2016, 4:47 pm
#22
Joined: Mar 17, 2008
Occupation: Software developer
Location: Ohio
Interests: Physics
Posts: 67
Either evaporating off their limbs or redirecting to torso is good. The torso hits should be invisible to the player, who just swings away until the ghost dies. I like the evaporating limbs a bit more.
Sep 15, 2016, 3:12 am
#23
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
I'll make ghost limbs severable, and make them disappear when severed until I can think of a proper way to do this.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Sep 15, 2016, 3:53 am
#24
Joined: Sep 22, 2008
Posts: 634
How about just replace the "limb is severed off" message with "limb disperses" if the target is a ghost? Functionally it's the same thing, but having parts of a ghost vanish instead of get severed doesn't seem too bad.
Sep 15, 2016, 4:58 am
#25
Joined: Dec 11, 2008
Posts: 1,770
Sounds like the Golem or Genie code if you ask me.
Reasonably sure that's just a flag in the script.
System would indicate in graphic if person is mounted on horse or not.
Same system also show if person mounted on boar, elephant, polar bear etc.
Or if person mounted on ass.
Ivan find mounting on ass funny.
Jump to