How to edit the "go to jail" skill effects

Post » Wed May 02, 2012 6:19 pm

Hi,
I'm working on a Morrowind Mod and there is one thing that gives me headaches: When the PC commites a crime and chooses the option "go to jail", some skills are eventually lowered or raised at the release date. I want to change that system, so that a jail-option won't effect your skills at all, or if that is possible the jail will only effect the maximum Healthpoints or Stamina. I haven't found anything related to this in the CS, could someone please help me out.
Thanx!
User avatar
Maddy Paul
 
Posts: 3430
Joined: Wed Feb 14, 2007 4:20 pm

Post » Wed May 02, 2012 8:11 pm

I don't think it is possible to prevent the skill drains. The best I could think of is to record the players stats, check the difference after, and then reset them all. You could probably do it if you were to force equip items to the player before they were sent to jail to remove any items that might be affecting skills, because Morrowind can't detect the base value of skills.
User avatar
Steve Smith
 
Posts: 3540
Joined: Sat Jun 30, 2007 10:47 am

Post » Thu May 03, 2012 12:15 am

Hmm, that doesn't sound too good at all. The Mod is nearly finished, if I could only solve this little problem. For me it is essential that I get rid of the "go to jail" -> skill influence :-(.
User avatar
Marina Leigh
 
Posts: 3339
Joined: Wed Jun 21, 2006 7:59 pm

Post » Wed May 02, 2012 10:51 pm

Well, if my idea is works, it shouldn't be too difficult to implement. Tedious, but not difficult. Do you have any knowledge with scripting? In the meantime, I'll see what I can do.
User avatar
Alan Cutler
 
Posts: 3163
Joined: Sun Jul 01, 2007 9:59 am

Post » Wed May 02, 2012 1:51 pm

Well, if my idea is works, it shouldn't be too difficult to implement. Tedious, but not difficult. Do you have any knowledge with scripting? In the meantime, I'll see what I can do.

Never did any scripting for Morrowind, so I have no idea how to implement your concept. On aspect of the Mod is to fix all these options for undermining the maximum level cap by abusing skill draining processes (magic/magical items/scripted events). I got rid of all other skill drains (at least I think so), except the "go to jail" event. Thank you for your quick help!
User avatar
Georgine Lee
 
Posts: 3353
Joined: Wed Oct 04, 2006 11:50 am

Post » Wed May 02, 2012 12:51 pm

Never did any scripting for Morrowind...
Then the question becomes; Do you have any experience with any kind of scripting language? If so, then reading Morrowind Scripting for Dummies might give you enough knowledge of the functions and syntax to figure it out. If not, then reading it anyway never hurts. ;)

http://yacoby.silgrad.com/MW/Mods/MWSFD.htm
User avatar
Trista Jim
 
Posts: 3308
Joined: Sat Aug 25, 2007 10:39 pm

Post » Wed May 02, 2012 3:59 pm

Then the question becomes; Do you have any experience with any kind of scripting language? If so, then reading Morrowind Scripting for Dummies might give you enough knowledge of the functions and syntax to figure it out. If not, then reading it anyway never hurts. ;)

http://yacoby.silgrad.com/MW/Mods/MWSFD.htm

.. nor have I ever worked with any scriptings before, but I'll read the guide. One more thing I want to ask you: I replaced several items in the game e.g. the ebony towershield in the Telvanni vault with a normal ebony shield. But when I clear the esp with ESPCleaner, the towershield is at its original place again. Do I really need to clear the mod's esp, for I did not really add new content, in all cases only I edited the stuff, that is in the original game allready (NPC stats, creature stats, item stats, handplaced items, leveled lists, containers).
User avatar
Laura-Jayne Lee
 
Posts: 3474
Joined: Sun Jul 02, 2006 4:35 pm

Post » Thu May 03, 2012 1:47 am

I just remembered that going to jail removes all of your items, so the force-equip probably isn't necessary.

You generally only need to clean if there are things that are edited in the mod that you didn't intend to edit. I usually just use the CS to clean accidental edits. You can click on the "Details" button when loading a mod in the CS and get a list of all things affected by your mod. Highlight the items you want to remove or reset, press delete, confirm, load it, and then save it right away. They will be gone from your mod. You can highlight multiple items using shift and ctrl. In the case of GMSTs you generally need to use something other than the CS, but if you load GMST Vaccine plus your mod and follow the above steps, the CS can remove them too. Just be sure to load GMST Vaccine every time unless you are using Morrowind, Tribunal, and Bloodmoon while making your mod to prevent them from coming back.
User avatar
Lizbeth Ruiz
 
Posts: 3358
Joined: Fri Aug 24, 2007 1:35 pm

Post » Thu May 03, 2012 5:09 am

I just remembered that going to jail removes all of your items, so the force-equip probably isn't necessary.

You generally only need to clean if there are things that are edited in the mod that you didn't intend to edit. I usually just use the CS to clean accidental edits. You can click on the "Details" button when loading a mod in the CS and get a list of all things affected by your mod. Highlight the items you want to remove or reset, press delete, confirm, load it, and then save it right away. They will be gone from your mod. You can highlight multiple items using shift and ctrl. In the case of GMSTs you generally need to use something other than the CS, but if you load GMST Vaccine plus your mod and follow the above steps, the CS can remove them too. Just be sure to load GMST Vaccine every time unless you are using Morrowind, Tribunal, and Bloodmoon while making your mod to prevent them from coming back.

Ah thanx for the tipps. The Mod is designed for Morrowind Single Edition (never was a big fan of the addons), so if I'm right, I don't have to care about GMSTs at all? So usingonly the CS to clear should be ok?
User avatar
LuCY sCoTT
 
Posts: 3410
Joined: Sun Feb 04, 2007 8:29 am

Post » Wed May 02, 2012 9:01 pm

Yes you won't have to worry about GMSTs as long as you didn't mess with any that you didn't intend to.

Unfortunately... without Bloodmoon you can't make the script I have work in your game. Bloodmoon adds a GetPCInJail function that this script depends on. The expansions are really fun, so I would get them. They add new scripting functions as well as content. GOTY version is dirt cheap. Used copies of the expansions could probably be found too. You're missing out on a lot by not having them, and for a game this old there isn't mush reason not to have it all. At the very least, the Morrowind Code Patch requires the game patched up to Bloodmoon, and you pretty much want that.

Here is the script anyway. I think checking for the skills after release is necessary either. Don't know what I was thinking. This will need to be started from dialogue, so the normal greeting for sending you to jail needs modified. In the result box for greeting 0, "Then you must serve a sentence of hard labor. Serve your time peaceably, and pay your debt to society.", replace GoToJail with StartScript, "jail".

begin jail ;You'll want to give it a unique name. Using your initials at the beginning is the standard. Avoid non-standard, non-alphabet characters. giro_jail, for example.short gotskillsfloat myacrobatics;Repeat for all skills. It would be a good idea to shorten the variable names, but leave the reconizable. myacr, for example.if ( MenuMode == 1 )	returnendifif ( gotskills == 0 )	set myacrobatics to Player->GetAcrobatics	;Repeat for all skills again.	set gotskills to 1endifif ( gotskills == 1 )	GoToJailendifif ( gotskills == 1 )	if ( GetPCInJail == 1 )		return	elseif ( GetPCInJail == 0 )		set got skills to 2	endifendifif ( got skills == 2 )	Player->SetAcrobatics, myacrobatics	;Repeat	StopScript, "jail"endifend jail
User avatar
Kat Lehmann
 
Posts: 3409
Joined: Tue Jun 27, 2006 6:24 am

Post » Wed May 02, 2012 2:23 pm

Yes you won't have to worry about GMSTs as long as you didn't mess with any that you didn't intend to.

Unfortunately... without Bloodmoon you can't make the script I have work in your game. Bloodmoon adds a GetPCInJail function that this script depends on. The expansions are really fun, so I would get them. They add new scripting functions as well as content. GOTY version is dirt cheap. Used copies of the expansions could probably be found too. You're missing out on a lot by not having them, and for a game this old there isn't mush reason not to have it all. At the very least, the Morrowind Code Patch requires the game patched up to Bloodmoon, and you pretty much want that.

Here is the script anyway. I think checking for the skills after release is necessary either. Don't know what I was thinking. This will need to be started from dialogue, so the normal greeting for sending you to jail needs modified. In the result box for greeting 0, "Then you must serve a sentence of hard labor. Serve your time peaceably, and pay your debt to society.", replace GoToJail with StartScript, "jail".

begin jail ;You'll want to give it a unique name. Using your initials at the beginning is the standard. Avoid non-standard, non-alphabet characters. giro_jail, for example.short gotskillsfloat myacrobatics;Repeat for all skills. It would be a good idea to shorten the variable names, but leave the reconizable. myacr, for example.if ( MenuMode == 1 )	returnendifif ( gotskills == 0 )	set myacrobatics to Player->GetAcrobatics	;Repeat for all skills again.	set gotskills to 1endifif ( gotskills == 1 )	GoToJailendifif ( gotskills == 1 )	if ( GetPCInJail == 1 )		return	elseif ( GetPCInJail == 0 )		set got skills to 2	endifendifif ( got skills == 2 )	Player->SetAcrobatics, myacrobatics	;Repeat	StopScript, "jail"endifend jail


Ok, I got your point and just ordered the GOTY. Thank you very much for the script, I will implement it as soon as I got the GOTY Edition :-). But for the the next days, I want and have to test the Mod with Vanilla Morrowind. Is there a way to remove the "go to jail" option/dialoge from the game? This solution would be ok for me while testing the Mod. Greetz.
User avatar
Lauren Graves
 
Posts: 3343
Joined: Fri Aug 04, 2006 6:03 pm

Post » Thu May 03, 2012 2:20 am

Good show! I forgot to mention that you can get it on Steam also, but whatever.

As for GoToJail, yes, it can be removed. Just follow what I said in my previous post, and just remove GoToJail form the result box entirely. I don't have a lot of experience with dialogue, but I believe that that should work.

I'm not entirely sure the script will behave as you expect. I haven't tested it because, as I said, it's a tedious script to write. It seems like it should though, but expect problems. It might be a good idea to make this little modification:

if ( got skills == 2 )	Player->SetAcrobatics, myacrobatics	;Repeat	set gotskills to 0 ;Resetting the variable for the next time.	StopScript, "jail"endif
User avatar
Rozlyn Robinson
 
Posts: 3528
Joined: Wed Jun 21, 2006 1:25 am

Post » Thu May 03, 2012 3:13 am

Good show! I forgot to mention that you can get it on Steam also, but whatever.

As for GoToJail, yes, it can be removed. Just follow what I said in my previous post, and just remove GoToJail form the result box entirely. I don't have a lot of experience with dialogue, but I believe that that should work.

I'm not entirely sure the script will behave as you expect. I haven't tested it because, as I said, it's a tedious script to write. It seems like it should though, but expect problems. It might be a good idea to make this little modification:

if ( got skills == 2 )	Player->SetAcrobatics, myacrobatics	;Repeat	set gotskills to 0 ;Resetting the variable for the next time.	StopScript, "jail"endif

Is it also possible to disable/remove the GoToJail dialog-option in Vanilla Morrowind? Where can I find the result box in the CS? I never got that deep into the CS, I'm abit clueless ...
User avatar
James Wilson
 
Posts: 3457
Joined: Mon Nov 12, 2007 12:51 pm

Post » Wed May 02, 2012 10:31 pm

To remove the option to go to jail, you'd have to remove the choice "Go to Jail." from the result box. You'd also have to renumber the other choices and edit the other dialogue entries relating to crime to reflect the renumbered choices. Otherwise Morrowind will explode.

The pinned threads at the top of the CS forum contain a list of tutorials. Do a page search for "dialogue", and you'll find a few. In short, click the button that looks like a speech bubble, find the tab that says "greeting", and under greeting 0 you can find the lines that match going to jail. The result box is at the bottom. Dialogue is tricky, and as I've said I don't have a lot of experience with it. Read up! They aren't nearly as long as the scripting guide.

http://www.gamesas.com/index.php?/topic/24-comprehensive-tutorial-and-useful-link-list/
User avatar
Miragel Ginza
 
Posts: 3502
Joined: Thu Dec 21, 2006 6:19 am

Post » Thu May 03, 2012 3:05 am

To remove the option to go to jail, you'd have to remove the choice "Go to Jail." from the result box. You'd also have to renumber the other choices and edit the other dialogue entries relating to crime to reflect the renumbered choices. Otherwise Morrowind will explode.

The pinned threads at the top of the CS forum contain a list of tutorials. Do a page search for "dialogue", and you'll find a few. In short, click the button that looks like a speech bubble, find the tab that says "greeting", and under greeting 0 you can find the lines that match going to jail. The result box is at the bottom. Dialogue is tricky, and as I've said I don't have a lot of experience with it. Read up! They aren't nearly as long as the scripting guide.

http://www.gamesas.com/index.php?/topic/24-comprehensive-tutorial-and-useful-link-list/

Ah ok, thanx for all, now it makes sense for me. You helped me out a lot! And the script you made looks very promising :-).
User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Post » Thu May 03, 2012 2:54 am

No problem. I've learned that scripts can be deceiving, no matter how promising they look. It's best not to get your hopes high, or they'll just disappoint you. Kinda like people. So, I'll just sit back and wait for it to fail, somehow. It's all fun and games until you have to debug! *shakes fist*
User avatar
Lil'.KiiDD
 
Posts: 3566
Joined: Mon Nov 26, 2007 11:41 am

Post » Thu May 03, 2012 4:29 am

How to edit the "go to jail" skill effects?

Don't try to make any more complicated than it needs to be. This is the simple and effective way.

Modify the result for the go to jail dialogue in greeting 0 ("Then you must serve a sentence of hard labor. Serve your time peaceably, and pay your debt to society"). Remove GoToJail and start a script instead.

Within your script (I'm not writing it for you), record the PC's crime level (GetPCCrimeLevel) and then set it negative (SetPCCrimeLevel -100). Then call GoToJail.

The player will be transported to the required location with all stolen items removed. No skills will be altered and no message will pop up. The players crime level will now be 0.

Apply your desired penalties based on the previously recorded crime level, and then pop up a message of your own to replace the standard jail message.

Alter the date to reflect time passed. You could skip this part if you wanted to. Nobody would care. If it was me writing the script, I would.

Then stop your script. It would be a good idea to put each part in an individual script state and increment the state each frame.
User avatar
Monika Krzyzak
 
Posts: 3471
Joined: Fri Oct 13, 2006 11:29 pm

Post » Thu May 03, 2012 4:15 am

Don't try to make any more complicated than it needs to be. This is the simple and effective way.
I had no idea you could do this. I've never had much reason to mess with crime level, so all that I know about it is what is in MWSFD, which obviously doesn't say that. I find it odd that -1 doesn't work the same way though.

I must say that I care if time advances. It's kind of pointless to serve time in jail if time doesn't pass. And in my defense, my script isn't very complicated, It's just tedious to type it all. Oh well, thanks for the info. Gotta write this down. I wonder what else I'm missing now...

Sorry Giro, I guess you didn't need the expansions after all. Rocket's way does work. It's very simple, and I think you could do it without much help, if any. Time should be trivial to implement too if you should want to. You just have to know that by default, you spend one day in jail for every 100 gold.
User avatar
rebecca moody
 
Posts: 3430
Joined: Mon Mar 05, 2007 3:01 pm

Post » Wed May 02, 2012 7:36 pm

I had no idea you could do this. I've never had much reason to mess with crime level, so all that I know about it is what is in MWSFD, which obviously doesn't say that. I find it odd that -1 doesn't work the same way though.

I must say that I care if time advances. It's kind of pointless to serve time in jail if time doesn't pass. And in my defense, my script isn't very complicated, It's just tedious to type it all. Oh well, thanks for the info. Gotta write this down. I wonder what else I'm missing now...

Sorry Giro, I guess you didn't need the expansions after all. Rocket's way does work. It's very simple, and I think you could do it without much help, if any. Time should be trivial to implement too if you should want to. You just have to know that by default, you spend one day in jail for every 100 gold.

@Arsuru
Thanx again for helping me with my problems. I now got the GOTY and implemented your script :-).

@Rocket
Did like you said for Vanilla Morrowind and it works. Thank you for your help, too.

quote:
"Apply your desired penalties based on the previously recorded crime level, and then pop up a message of your own to replace the standard jail message.

Alter the date to reflect time passed. You could skip this part if you wanted to. Nobody would care. If it was me writing the script, I would.

Then stop your script. It would be a good idea to put each part in an individual script state and increment the state each frame."

I have no idea how to do this, I'm a bit into dialog now, but now I have no time to get into scripting at all :(. My 3 weeks of holiday are over and I have to write a thesis work.
So I'm afraid it will end up without the popup message and time pass reflection.

Thank you two for your great help again!
User avatar
Hussnein Amin
 
Posts: 3557
Joined: Sun Aug 05, 2007 2:15 am

Post » Wed May 02, 2012 8:55 pm

In the script I gave, the variable gotskills is the state, and it is incremented each frame.

Anyway, now it comes down to how you want to do it. Adding a message box and time passage to Rocket's script would be easy. It would probably be shorter than mine too, not having all those variables for each skill. Adding penalties to either would be easy. When you get the time to mess with it though, I can help you if needed. If you were able to apply Rocket's script and make it work though, then the rest of this should be pretty easy for you, whichever method you choose.
User avatar
Alexander Horton
 
Posts: 3318
Joined: Thu Oct 11, 2007 9:19 pm


Return to III - Morrowind