CS Questions

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
Post Reply
User avatar
barlor
Posts: 8
Joined: 24 Feb 2017, 12:49

CS Questions

Post by barlor »

Hi, I am fiddling around with the CS looking thru scripts and what not, trying to find any mention of skillcap. Basically, I am wanting to change the maximum level in a skill to 50 rather than 100. I couldn't found how to do it, so I turn to you for help. Will I need to write custom script for this?

Another question have is I also want to make some respawn script. If certain object is harvested, like Adamantium for example, or certain NPC is killed and will respawn in a set time. I'm not sure how to approach writing something like this
User avatar
DestinedToDie
Posts: 1181
Joined: 29 Jun 2015, 09:08

Re: CS Questions

Post by DestinedToDie »

I think this is hardcoded. You'll probably have to wait post 1.0 before it gets de-hardcoded.
User avatar
sjek
Posts: 442
Joined: 22 Nov 2014, 10:51

Re: CS Questions

Post by sjek »

yep
custom script and it's mostly copy pasting so here (haven't tested ingame)

Code: Select all

Begin aa_skillscripting

short gap
short gapo

float timer
short phase

set gap to 50
set gapo to 50

set phase to 10
set timer to (timer+getsecondspassed)

if timer < phase
	return
endif

if timer > phase
	if player->getArmorer > gapo
		player->setArmorer gap
	endif
	if player->getAthletics > gapo
		player->setAthletics gap
	endif
	if player->getAxe > gapo
		player->setAxe gap
	endif
	if player->getBlock > gapo
		player->setBlock gap
	endif
	if player->getBluntWeapon > gapo
		player->setBluntWeapon gap
	endif
	if player->getHeavyArmor > gapo
		player->setHeavyArmor gap
	endif
	if player->getLongBlade > gapo
		player->setLongBlade gap
	endif
	if player->getMediumArmor > gapo
		player->setMediumArmor gap
	endif
	if player->getSpear > gapo
		player->setSpear gap
	endif
	if player->getAlchemy > gapo
		player->setAlchemy gap
	endif
	if player->getAlteration > gapo
		player->setAlteration gap
	endif
	if player->getConjuration > gapo
		player->setConjuration gap
	endif
	if player->getDestruction > gapo
		player->setDestruction gap
	endif
	if player->getEnchant > gapo
		player->setEnchant gap
	endif
	if player->getIllusion > gapo
		player->setIllusion gap
	endif
	if player->getMysticism > gapo
		player->setMysticism gap
	endif
	if player->getRestoration > gapo
		player->setRestoration gap
	endif
	if player->getUnarmored > gapo
		player->setUnarmored gap
	endif
	if player->getAcrobatics > gapo
		player->setAcrobatics gap
	endif
	if player->getHandtohand > gapo
		player->setHandtohand gap
	endif
	if player->getLightArmor > gapo
		player->setLightArmor gap
	endif
	if player->getMarksman > gapo
		player->setMarksman gap
	endif
	if player->getMercantile > gapo
		player->setMercantile gap
	endif
	if player->getSecurity > gapo
		player->setSecurity gap
	endif
	if player->getShortBlade > gapo
		player->setShortBlade gap
	endif
	if player->getSneak > gapo
		player->setSneak gap
	endif
	if player->getSpeechcraft > gapo
		player->setSpeechcraft gap
	endif
	set timer to 0
endif

End aa_skillscripting
(edit: ups. removed to's from setskill functions)
http://en.uesp.net/wiki/Morrowind:Skills

that goes trought every skill each ten second and set them back to 50 if over it. dunno how this interact but if it calculates partial to level progressing you still can level up. otherwise it needs gapo set to 51 to allow that extra going to toward levelup
otherwise would recommend looking for galsiath, madd or mcc http://www.nexusmods.com/morrowind/mods/44294?
there's also others.

that script on up could be surely optimised for preventing lag spikes and probably won't work on vanilla with function on both sides on if lines. separating checks to one per frame maybe
incrementing one variable with set n to n+1 but which part would allow it to run trough not sure of.
separating checking logics and such....

you can also use this on dialogue result box for npc which to visit once in a while

directly going for progreslevel bar in attributes window needs mwse and reckon mcc is better model for that.
http://wiki.theassimilationlab.com/mmw/ ... gressLevel
-----------------------------------------

for getting respawn working you can use unloaded cell and write timer check for a month as chargem revamped http://www.nexusmods.com/morrowind/mods/44615/? does it

or you can use moon phases http://en.uesp.net/wiki/Tes3Mod:GetMoonPhase

ie. writing a global script with check. if all are with unigue id's you can use resurrect directly. otherwise it just find first found starting from solstheim corner. with all same id's local script is in order. don't believe that it would force the local to change based on global variable change and there's no forceload function so saving the mined / dead phases to variables and checking those against variable in global script that the effect takes hold when the cell is loaded. for example putting moon phase only on local script would cause it to trigger on certain phase only when y are in the same cell as the script / object which it's on.

there's probably some workaround way to check moonphase while in interior but idk. simples might be to set moonphase to variable in global and save it for about 60 sec. enough for interior script to trigger. changing from interior to interior would rely on moonphase when last visited outside though.

or just timer which go for 3600 for an hour as seconds. resting might be skipped as 1 sec or calculated for all.

hope that helps .p

Code: Select all

resurrect
User avatar
barlor
Posts: 8
Joined: 24 Feb 2017, 12:49

Re: CS Questions

Post by barlor »

Wow, sjek thanks for valuable info and explanation. I will try both things you have posted here and report back what I've done with them
Post Reply