Crime - Persistent to Location

Post » Tue Dec 29, 2009 3:18 pm

Hi. I have a new worldspace. Tamriel is not being used at all and the main quest and the dark brotherhood have been disabled.

I am currently playing with populating a large city, and I am starting to give thought to how I want to play the guards in the city(s). My initial plan was to stick with the default Guard class and allow them to behave in the same way as they do in Tamriel, however, another thought has occurred and Id like some advice on how to proceed.

Id like to have crime location based. So for example, if I kill someone in city 'a', then the guards of city 'a' will arrest me if they see me (just like normal), and after a time will begin to ignore me. However, if I then travel to another city, the guards in the new city will know nothing about my crimes elsewhere, and will not react to me at all unless I then commit a crime in that city too.

I know that there is a mod somewhere that does this for Tamriel, although I don't know the name of it, and Id like to try and implement this in a script myself.

So. Questions:
A.) How do I detect a crime AND can I detect the area/region that it has been committed in?
B.) The game currently registers my bounty etc. Is there a way to prevent this and deal with it myself instead?
C.) I have a script that is set to my custom dialog (for a new race), so I have somewhere to store bounty and crime stats, however, I'm not sure how I would write the guard script. Any ideas?

I'm guessing that if I can detect a crime and its location, I can then set a variable to show where it was committed, and also store a variable that contains the current bounty in that area. The guards for that location would react to these variables, and after a time period the variables would decrease until they are finally reset to nothing (Providing of course I don't commit any more crimes in that area)

That's the plan, such as it is. Id rather get this to work myself than add another mod for it, assuming even that the other mod would work in a new worldspace.

Any advice would be helpful

Cheers

MVK
User avatar
Haley Cooper
 
Posts: 3490
Joined: Wed Jun 14, 2006 11:30 am

Post » Tue Dec 29, 2009 12:04 pm

If your mod already relies on OBSE, you can take a look at kuertee's http://www.tesnexus.com/downloads/file.php?id=22894 mod. If your mod does not rely on OBSE and you don't want it to rely on OBSE at all, you can take a look at my http://www.tesnexus.com/downloads/file.php?id=5977, which doesn't require OBSE.
User avatar
Darren
 
Posts: 3354
Joined: Wed Jun 06, 2007 2:33 pm

Post » Tue Dec 29, 2009 9:11 am

Thanks Reneer - I knew I recognized your name!

No I'm not using OBSE right now - I decided to see how I could do without it. Anyway, Ill take a look at your mod thanks, no doubt Ill learn something to my advantage.

I actually started making some progress with this myself, but Id like to compare the two methods since yours allows far more complexity.

Cheers

MVK
User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am

Post » Tue Dec 29, 2009 4:05 am

Hmm. Well Iv had a look through your mod Reneer - most impressive, but much to complex for me to decipher what you did to get things working!

Here's what I have so far:

I'm in a new worldspace that does not connect to Tamriel. My NPC's including the Player are a custom race (to avoid the default dialog). Each NPC is a member of a custom racial faction (again to remove from the default dialog), and also another faction that is determined by where they live, ie:MyCity01Faction

I have a quest that is used for my NPC's dialog. I attached a script to this quest that checks GetPCFactionAttack for any attacks on members of MyCity01Faction.
If this returns 1 then another quest is advanced to stage 10 as a marker for another script, a counter is started and SetPCFactionAttack is used to set this back to zero. If there is another attack, the timer variable is increased.

Meanwhile in the same script there is a check for the other quest that was advanced to stage 10. If this is the case then using GameDaysPassed to check against the counter I remove the 'Wanted' level and set the test quest back to stage 1 (preventing the timer).

If the player attacks another person belonging to the city faction then the time required until they are cleared simple increases.

Problem:
if ( GetPCFactionAttack MyCity01Faction == 1 ) never returns 1, or the script is not being run.

I have a feeling that the quest that this script is attached to is not cutting the mustard. There are no actual quests set out yet, I'm still building, so the only quest that I have available to attach this script to is the one I use for my custom race dialog. Of course I might be WAY out! :)

Any ideas?

Cheers

MVK
User avatar
Floor Punch
 
Posts: 3568
Joined: Tue May 29, 2007 7:18 am


Return to IV - Oblivion