Jump to content

changing Skeletons in runtime?


Recommended Posts

hi guys I noticed that oblivion can really screw skeletons up, I have the playable centaurs mod but it's ruined one of my saved game's characters skeletons. is there some mod out there we can use to reset the skeleton or select it something like that? if not we could really use that as it would solve so many of oblivions skeleton problems. 

Link to comment
Share on other sites

  • 2 weeks later...
  On 12/25/2024 at 12:00 AM, Selene310187 said:

Do you get a CTD when loading the save game of the character in question?

Expand  

no just a broken up skeleton; this was supposed to go in an oblivion thread btw. but even if that weren't the case in oblivion we have no real way to switch skeletons at runtime which can really mess up your game's savefile(s) and or just ruin the experience.

Link to comment
Share on other sites

For example Curse of Hircine - Resurrected mod changes a player's skeleton upon werewolf transformation in (almost - using quest script which is running with 1s pause) realtime, using OBSE function SetModelPath:

  Reveal hidden contents

 

  • Like 1
Link to comment
Share on other sites

I examined the plugin of the Centaur race in the Construction Set. When you load the mod in your game the first time, a quest script changes the race of your character to Centaur (quest DMCentaurEnableQuest).

The relevant part to the script:

SetRacePlayable DMCentaur 1

 

There's a NPC who has the custom skeleton assigned (file path: DMCentaur\_male\skeleton.nif). I think creating a NPC with a custom skeleton makes the race using the custom skeleton.

What race was your character before you installed the mod?

You need a script that changes your character's race back to the original one. We can use the mod's race changing script as base.

So if the original race is Imperial, the script could look like this:

SCN OriginalRaceEnable

begin gamemode
    message "The race is changed back to Imperial"
    SetRacePlayable Imperial 1
    StopQuest OriginalRaceEnableQuest
end


begin menumode
    message "The race is changed back to Imperial"
    SetRacePlayable Imperial 1
    StopQuest OriginalRaceEnableQuest
end

Attach this script to a newly created quest named for example OriginalRaceEnableQuest and activate the "Start Game Enabled" option.

The command SetRacePlayable is an OBSE command. Start the Construction Set with Oblivion Script Extender enabled to make the command work.

 

Edit: Please forget what I said about SetRacePlayable. RomanR is right.

Edited by Selene310187
  • Like 1
Link to comment
Share on other sites

@Selene310187, I'm afraid that you are mistaken what SetRacePlayable does. This command, according to docs, changes "playable" flag only. This flag makes race selectable when using ShowRaceMenu command or on new game among some things.

Skeleton is defined in NPC's base object definiton (and yes, you'll find player defined among them too). However with OBSE (as this mod uses it too), it should be possible to assign normal skeleton back upon loading a save. I would use this course of action:

1. Envelope such script in condition using GetGameLoaded function.

2. Checking actual player's race and determine if it's a beast race or not (propably best is to use GetRace function).

3. Checking if player has already right skeleton assigned using functions like GetModelPath/CompareModelPath.

4. If not, set it to right skeleton using SetModelPath command.

And if someone ask why I won't do it myself, I answer that I'm quite hesitant to register on another mod site just to download one mod and due a complicated experience working on unfinished race mods in general.

  • Like 2
Link to comment
Share on other sites

  On 1/5/2025 at 8:53 PM, RomanR said:

@Selene310187, I'm afraid that you are mistaken what SetRacePlayable does. This command, according to docs, changes "playable" flag only. This flag makes race selectable when using ShowRaceMenu command or on new game among some things.

Expand  

Thanks for the clarification. ๐Ÿ™‚

 

I forgot to mention that the race has a lesser power called Humaniod Form (Editor ID in the Construction Set: DMCentaurHumanFormSpell). It changes the skeleton back to human for short amount of time but you can't use the first person view when the lesser power is active.

The script of the lesser power:

SCN DMCentaurHumanFormSpellSCRIPT

begin ScriptEffectStart
	if IsThirdPerson == 0
		ToggleFirstPerson 0
		message "First Person View not avaiable during human form"
	endif
	SetPlayerSkeletonPath "characters\_male\skeleton.nif"
	if player.getitemcount DMEmptyCoverTail < 1
		player.additemns DMEmptyCoverTail 1
	endif
	player.equipitemns DMEmptyCoverTail
	player.removespellns DMCentaurWind
	player.Dispel DMCentaurWind
end

begin ScriptEffectUpdate
	if IsThirdPerson == 0
		ToggleFirstPerson 0
		message "First Person View not avaiable during human form"
	endif
	
	if player.GetEquippedObject 15 == 0
		player.equipitemns DMEmptyCoverTail
	endif
end

begin ScriptEffectFinish
	SetPlayerSkeletonPath "DMCentaur\characters\_male\skeleton.nif"
	player.unequipitemns DMEmptyCoverTail
	player.addspellns DMCentaurWind
end
  • Like 1
Link to comment
Share on other sites

What is interesting that SetPlayerSkeletonPath command works in my ancient v 21.4 too, although it's not even mentioned in its docs which came with it originaly.  However when I played with it, while testing experimental script which targets Drake the Dragon's dragons, I began to suspect that OP origin of problems come due the straight assigning a skeleton file to player's base object.

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
ร—
ร—
  • Create New...