Welcome Guest ( Log In | Register )

> Renee's Modding Thread
Renee
post Feb 25 2018, 01:30 PM
Post #1


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Mod-making thread basically, which focuses heavily on quest-making. The first two tutorials (How to make a fetch quest and how to make a kill quest) are very hand-holdy. They are designed for those who are just starting to learn the art of quest-making. Other tutorials get more advanced, as my wacky ideas have pushed their boundaries.

Just click on any of the links in the post below this one. smile.gif


Bethesda Units. (How distance compares in-game to real-life).

Xpadder Walkthrough page. Xpadder is a site which allows gaming controllers to mimic the key & mouse functions. Xpadder, or similar programs such as Joy to Keys, are absolutely crucial to get the most out of older games such as Arena, Daggerfall, Morrowind, and Oblivion, for those who prefer controllers. They can also be used for newer games (Fallout 3/NV or Skyrim) to provide alternate controlling scenarios during times when a game's native D-pad arrangement needs to be shut off.




This post has been edited by Renee: Apr 16 2024, 06:27 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
Renee
post Jun 4 2020, 08:25 PM
Post #2


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



Adding a Jail and enhancing Fallout's Crime System. Game: Fallout 3

In the year 2017 a character I rolled, Janet Telia, wound up going to jail. This was a real event, something which actually happened in her game. But this event was a one-time thing, quest-driven with one-time stages.

What if this were something which can happen at any time? Assuming the player-character commits a crime, of course, and is caught!

Fallout 3 does have a crime system, which is broken into Minor and Major crimes. Minor Crime includes stealing, trespassing, and pickpocketing. Major Crime includes assaults and murder. In the vanilla game, committing enough of either crime will cause a single NPC, or an entire faction of NPCs, to try killing our character at worst. If the NPC's AI Data is set to Unaggressive and Cowardly, this NPC will flee instead, but he or she will still record the PC's crime as Minor or Major. But this is all. Nobody will ever try to arrest us for random crimes. nono.gif

My idea is similar to Elder Scrolls games. This idea will include the usual three choices: Go to Jail, Pay Caps, or Resist Arrest. But, there is a difference too: the way I'm going to describe this below, our player-character can only get arrested in Megaton. Maybe in the future I'll also add Rivet City. But no psychic guards shall roam the Capitol Wasteland, unless you want them to.

The main difference between the way crime works in Fallout (as opposed to any Elder Scrolls game except Arena) is Fallout's Crime Counts never go away, whereas in Elder Scrolls it is possible to get Crime Gold to 0. If your character is caught stealing from somebody in Elder Scrolls IV: Oblivion for instance, it is possible to pay some money or go to jail. This will clear any crimes, returning the game's crime count to zero.

In Fallout, crime counts always remain. If your character is caught stealing in this game, and let's say MinorCrimeCount rises to 5.00, this is where the count shall stay forever. As far as I know, there is no way to get this count back to 0.00.

...And this creates some problems, of course. GetMinorCrimeCount and GetMajorCrimeCount exist, but there is no such thing as SetMinorCrimeCount or SetMajorCrimeCount, or anything equivalent with a different set of names. Because of this, the scripts for this jail idea get longer and longer, in an effort to make sure the officer keeps registering how much crime has been committed. The end result? Eventually the criminal essentially becomes 'banned' from Megaton. It has to happen this way, unless somebody out there figures how to script better than i can!

I don't know if the FOSE team has done anything here for resetting crime; my search of a Fallout Script Extender site did not return any results for crime at all.


Good news is, any NPCs who have been angered by crimes (causing them to fight) eventually will mellow. Bethesda hardcoded Fallout 3 this way, probably because they had to so gamers could progress with some of the game's quests. After 72 hours, even the most fearsome NPC will regain his or her temper, and it's possible to reenter the cell in which this NPC can be found.

Basically, they forgive, but they never forget.

-----------------------------------------------------

MAKING THE JAIL


1a). First step is to duplicate a cell, or create one from scratch. I am not very good at making cells from scratch, so instead I'll simply duplicate MegatonJerichosHouse. I like this cell because it is like a mobile home: everything is on one story. Easier to work with. Jericho's house is also separated conveniently into a larger immediate area + a smaller alcove which has a bed. The smaller area is going to be the actual prisoner's cell, while the larger area will include a bot who eventually will patrol around.

I found one small problem with duplicating Jericho's pad. In the Test character save I used, a second Jericho showed up in my game, despite the fact that I deleted Jericho from the duplicated cell. Once I realized this anomaly, I used the console to Mark For Delete the duplicated Jericho, once I was back in the game. This did not happen in any of my main characters game I've loaded so far, only the test character.

1b). Back to the GECK. In the Cell window's left panel, select the duplicated cell and press F2. Change the cell's name. I am calling it aaaMegatonJail.

1c). Right-click > Edit the duplicated cell. Click on the Interior Data tab and change its Name. I am calling it Megaton Jail. Also, change the Owner NPC scroll-bar from whomever is its current owner (if there is one) to NONE. If the cell is owned by a faction, set this to NONE. There is going to be an NPC who does own this place, but he or she has not been made yet. And it's better to use somebody new, rather than one of the vanilla NPCs already in the game.

Click Apply, click OK.

1d). Now comes the fun part. Time to remove whatever items you'd like. Or, you can keep any items you are unsure about, moving them out into the void.

Turns out, Jericho's place is not large enough. So I toggled Snap to Grid and Snap to Angle on. Then I selected a portion of its middle section, duplicated it, moved the area where the jail cell shall be (extending the cell's middle), and then moved the duplicated area into the initial area.

Here is what the jail looks like so far, with NavMesh turned on.

I did not mess with the area on the left side of the cell. This is where a robot is eventually going to patrol. Note the red stuff on the floor. This is navmesh. Navmesh tells NPCs where they can walk, and where they cannot. Since the robot is never going to travel into the area where the prisoner stays (which is on the right side of the cell) it's not important that there's no navmesh there.

> If there is an owned bed already inside the cell, change its Ownership to Player.

> I also added a sink into the jail. Since I use Realistic Needs, my character will need to drink occasionally, and water is one thing which is always free in jails. But what about food? Don't worry. Food gets handled, too.

Time to deal with NavMesh. Although I am not messing with navmesh in the cell I just duplicated, I left some instructions below for those who want (or need) to change this. Note that working with navmesh takes practice. And practice takes time. Those who don't need to mess with this can skip to step 1f.

1e). From the main toolbar, select NavMesh and then select Remove Cell NavMeshes, which is roughly halfway down the list.

New NavMesh must now be generated, and this gets complicated, but is very important. NavMesh is what allows NPCs to walk over specific areas, it is also supposed to keep them from walking into inanimate objects such as walls and rocks (though sometimes they still do this). If new NavMesh is not added, any NPCs who enter this cell, or are placed into it, won't be able to move. embarrased.gif Yes, this happened to me!

Describing how to add NavMesh requires some visual aids, so watch the video below, following the Anonymous Dev's instructions.

https://www.youtube.com/watch?v=RYJAj-63FR4

Note that in most cases (esp. with duplicated cells), new navmesh is not 100% necessary, for those who wish to skip this step and save time.

Tip: Turn Snap to Grid and Snap to Angle back on, if these have been turned off for NavMeshing.


1f). OBJECT window
Now to add the jail's cell door. This is going to be a sliding door, which can lock and unlock. In the Object window's left panel, select All, and then type Jail in the Filter slot. Find and select JailDoor01. Drag the jail's door into your cell. Obviously it's important to make sure this door will block the area where the prisoner will stay. Since one door was not enough to block the way out, I duplicated the first door, and moved the duplicated door over.

1g) Give the door a Reference ID. I named it aaaMegatonCellDoorRef. Copy this Reference ID and paste it onto a Notepad page. In fact, it helps to copy/paste any referenced names like this, since they will later get used in scripts.

Toggle Persistent Reference on. Click OK.


1h). Get JailDoor01 out of the filter and select Items > Key. Edit a key. Doesn't matter which one, but try to select keys which don't already have scripts attached.

Edit the jail door so that only this key will open it.

1i). In the CELL window, there are some choices. It is possible to put a door on an empty space of building, anywhere in Megaton, therefore, the prisoner is in Megaton when he/she gets out of jail. I decided to take this several steps further. Used the Render window and went out into the Wilderness, somewhat west of Vault 101. Then I went into the Object window > World Objects > Static, and dragged MegatonMisterBurkesHouse out into the wasteland.

Next I found MetalScrapDoor01 and dragged this door into the Render window. Connected this door to the cell's entrance door. The reason I made the jail way out yonder is because spending time in jail won't clear one's bounty (or crime count, as the GECK likes to call it) and I originally had problems with the main officer (who has not been made yet) still trying to arrest us after we get out of jail. Later on, I fixed this problem. But in roleplay terms, it just makes more sense that the player-character is temporarily removed from Megaton society. This is not 100% necessary, so those who wish to put the jail in Megaton itself, this is fine.

Here is what the final Megaton Jail looks like in my game. Again, the right side of the cell (roughly 2/5 of the space) is where the PC gets locked up.


1j). Make sure the interior of the jail is in the Render window. Go into the Object window > World Objects > Container and drag any non-scripted container into the Render window. I dragged LockerVault01Empty in there.

1k). Double left-click on the container, and choose the Edit Base button. Rename its ID and Name. I am calling it aaaEvidenceLocker and Evidence Locker. It helps to make sure this container is completely empty, for this is where the player's stuff will get stored after being locked up. ph34r.gif

1l). Make sure Respawns is not toggled on. Click OK, and save as a New Form.

1m). Go into the Ownership tab and choose Player. Give the container a Reference Editor ID (aaaEvidenceLockerRef), and toggle Persistent Reference on (if it's not already toggled).

1n). Two more steps. Go into the Object window > WorldObjects > Static and drag an XMarkerHeading into the jail. Put it the area where the prisoner shall stay. Essentially, put this marker behind bars. ph34r.gif Give this XMarkerHeading a Reference ID. I named it aaaMegatonJailPlayerXMarker. Copy / paste this onto a Notepad page.

1o). Drag a second XMarkerHeading into the jail, but this time do not put it behind bars. This second marker is where the PC will get teleported, assuming greater crime has been noted. Essentially, the PC gets temporarily banned from Megaton, and will need to stay out of town for 3 days! I named this second marker aaaMegatonJailBookingMarker. Copy/paste this also, so it can be copy/pasted into scripts later.

Click OK. Save.


MAKING THE OFFICERS

One or two officers are needed. I am opting for two. The first one will perform initial arrests, and the second assists in beating down the criminal, if he or she resists arrest. First I'll make the arresting officer. This gal will handle all the dialog, and she's much more complex than the second officer.

OBJECT window > Actors > NPC
2a). Follow all the usual steps for making an NPC: choose Race, Voice Type, ID, and Name. Click OK. My officer will be a lady with the ID name of aaaMegatonOfficer. I toggled Respawns on, so that if one of my characters wants to try to pwn her (and succeeds somehow), another officer will eventually take her place. Essential can also be chosen, of course.

Traits tab
2b). Change Class to SecurityOfficer. This arranges the officer's stats and attributes in a particular way, making him or her ready and capable for the job. Change Alignment from Neutral to Good.

Stats tab
2c). I wanted to make a tough, but not impossible-to-beat officer. So I selected PC Level Mult and put 3.00 into the Level Mult slot. AutoCalc Stats can be used as well, to make the officer stay truest to the SecurityOfficer class.

Factions Tab
2d). The officer gets added into the MegatonResidentFaction, causing her to become part of the citizenry, occasionally making small talk with other Megatonites. Also add him or her into the MegatonCrimeFaction. This will cause the officer to recognize Minor or Major crimes committed against residents of Megaton. Both of these factions are necessary for the arrest process to function.


AI Data tab
2e). Set the scroll-bars like so. It's important to make somebody who remains peaceful by default, but will not back down from combat if the need arises.

Aggression: Aggressive
Confidence: Brave
Assistance: Helps Nobody
Responsibility: 90

Assistance is set to Helps Nobody, which normally means the NPC won't care if Friends and Allies are getting into trouble, but this is not a problem, because we're going to want the officer to focus on arresting the player only. Not getting into combat with him or her. This part (combat) gets handled later on by scripts, if Resist Arrest gets chosen.

AI Packages tab
AI does not need to get specifically added to the officer. I have tried to add a DefaultSandbox package, but this messes everything up later on. Instead...go to the ....

Main toolbar > Character > Packages

2f). Start a Find package. Give it an ID and copy this ID. Paste the ID onto a Notepad page, because it's going to be needed later on. I just named it aaaArrestPlayerPackage

2g). Specific Reference is toggled on by default. In the Ref scroll-bar, scroll down to PlayerRef.

2h). Toggle Allow Search on. 'Near editor location' can stay toggled, Type 1024 into the Radius slot. This is roughly 48 feet (14.6 meters) which is not nearly the total diameter of Megaton. Technically it is possible for a criminal to avoid the officer after being witnessed committing some crime, but in my game, this is always a dice-roll. I put the officer in the middle of Megaton, but since she sandboxes around a little bit, my character and I will never know exactly where she is, assuming we're trying to avoid her somehow.

2i). Flags tab: Toggle Always Run on. Toggle Fallout Behavior off.

2j). Make a second package, this time selecting Sandbox. Simply pull up DefaultSandboxEditorLocation1024, rename its ID, and Save as a New Form. Nothing else needs to be changed, although some may wish to mess around with the Flags tab. I am calling this package aaaMegatonOfficerSandbox. Copy this script and paste it onto that same Notepad page.

Click OK, close the Packages window, and save.

2k). Put the officer somewhere into the world (I chose ground zero of MegatonPlaza, right next to the Brass Lantern and bomb). Give him or her a Reference ID. I am calling her aaaMegatonOfficerRef.

The rest of the officer's tabs can be changed around however you'd like. I added ArmorTenpennySecurity and HatPoliceAdult to give her an appropriate look. I also gave her WeapPoliceBaton, a 10 mm handgun, and some 10 mm rounds.

Optional: add the jail door's key into his or her Inventory. This can now be stolen by a really good thief! It is possible to break out of jail if one has the key. It is also possible to write the upcoming quest so that breaking out of jail will cause more problems for the PC. This gets complicated though, and what's about to follow (the quest) is complicated enough. Getting everything to work right is complicated enough!

Click OK and save.


2l). Go back into the officer's NPC panel. Start a script like so...

scriptname aaaMegatonOfficerScript

short Status


2l). Close and save. Click OK, closing all officer's panels. Save, and reopen the officer. Find that script in the scroll-bar, bla bla. Reopen it.

Here is what it's going to look like...

scriptname aaaMegatonOfficerScript

; Status 0 -- No or low crime committed. Megaton officers sandbox. Most “good” PCs will remain at Status 0 forever.

; Status 1 -- Triggers during first arrest process. PC has been caught with their first crime, Major or Minor.

short Status

Begin GameMode

;----------------------------
;The scripts below deal specifically with the arrest process.

If (Player.GetInWorldspace MegatonWorld == 1) && (Status == 0)
If (GetMinorCrimeCount >= 3) || (GetMajorCrimeCount >= 1)
Set Status to 1

EndIf
EndIf

If (Status == 1)
aaaMegatonOfficerRef.AddScriptPackage aaaArrestPlayerPackage

EndIf
;--------------------------------
;The scripts below cause the officers to sandbox in Megaton, if the PC has not committed any crime yet.

If (Status == 0)
aaaMegatonOfficerRef.AddScriptPackage aaaMegatonOfficerSandbox

EndIf

End



> To summarize. The first two scripts, when Status gets set to 1, cause the main officer to arrest our toon IF our toon has committed a certain number of Minor or Major crimes. The third script is used to make sure the officer does NOT rush up to the PC if no crimes have been committed. She should not do this even without the script, but the Status 0 script confirms things.

> Status always starts at 0, assuming this is a new game without any criminal catches, or if one has a character who has never been caught doing any crimes, yet.

For those who add this Jail mod idea to your game. If the main officer comes rushing up once your character enters Megaton, you may think there's an error here. But try toggling the console on, and then click on the arresting officer. Type GetMinorCrimeCount and press Enter. Do the same with GetMajorCrimeCount. Chances are, one or both of these will be high enough to cause the officer's behavior. And this is because your character has already committed some crime(s) in the past. Yes, this happened to me. biggrin.gif

Like I said before, Fallout NPCs may forgive past crimes, but they never forget.

> Notice there is some leeway for minor crimes. The officer will do nothing if minor is below 3. This allows the PC to make a mistake. If trying to speak to an NPC for instance, but accidentally wind up stealing an owned object, the officer won't automatically come after the PC, assuming this happens just once. Stealing just one item can tally 1.00 or 2.00, so let's make 3.00 the official number of confrontation.

> Major crimes, on the other hand, will be regarded more quickly. If somebody slaps, slams, or shoots someone else, chances are they did so deliberately. Feel free to nudge either of these numbers to your liking.

> Major Crime works in a different manner than Minor Crime. If we are witnessed stealing our first item, Minor moves from 0.00 to 1.00 or 2.00. If we steal a second item and are witnessed, that number moves upward again. Major Crime is not as predictable. Sometimes it moves upward, and sometimes it does not. My test character assaulted and killed the Mercenary who stays in Craterside Supply for instance, causing Moira Brown to flee her shop. Major Crime jumped from 0.00 to 2.00. In an Elder Scrolls game, Crimegold would get much higher than this for a full-blown murder. Because of this, Major Crime's counts (in scripts below) is set up differently than the more-predictable Minor Crime.

A second NPC was killed by my Test guy, this time right in Megaton's central area. This time, Major Crime jumped from 2.00 to 6.00. I think the greater number resulted because there were more witnesses. ... So, it's hard to find an apt punishment which fits the major crime. Pwning that Mercenary resulted a Major of 2.00, which means somebody can get off lightly...200 caps paid, the way I've got this set up below, if nobody witnesses this pwning. This doesn't seem enough, right? But there's not much I can do about this; Beth hardcoded the way crime works in this game. Anyway, we'll get to all that later.

> Finally, note that there are rare times when the officer will have a different crime count than ordinary Megaton NPCs. ...Maybe clicking a Megaton Settler, and then checking for crimes with the console will yield a result of 0.00 or 2.00, whereas the officer will register 4.00. So always click on the arresting officer when trying to check for crime.

All of that is rather complicated, right? wacko.gif Fortunately, the second officer is much simpler...


2m). Make a second NPC. This is going to be the officer who assists the main (arresting) officer, smacking our character around if Resist Arrest is chosen. In my game, this is a man with aaaComplianceOfficer as an ID.

2n). Toggle Respawns on, click OK, and reopen the officer.

The rest of those tabs can be arranged however you'd like, but make sure the second officer goes into the same MegatonResidentFaction and MegatonCrimeFaction as the arresting officer.

Place him or her into the same worldspace as the arresting officer and type a Reference ID. I called him aaaComplianceOfficerRef.



MAKING THE QUEST

OBJECT window > Actor Data > Quest

3a). Start a new quest (duh). ID is necessary, but Name is not. I am calling it aaaJailFallout3Quest.

Priority can be 90, just like it is in Elder Scrolls games when Legions try to arrest us. In theory, getting arrested takes precedence over everything, including the Main Quest, possibly.

3b). Start Game Enabled can stay on. Also, toggle Allow Repeated Conversation Topics on. Script Processing Delay can also be toggled.


3c). Start a script, like so...

scriptname aaaJailScript

short Arrest

short Timer1
short Timer2
short Timer3
short Timer4
short Timer5

short StartDay1
short StartDay2
short StartDay3
short StartDay4
short StartDay5



3d) Set the Script Type scroll-bar to Quest and close the editor window. Click OK, closing the Quest window. Reopen it, and find the quest in the scroll-bar. Click OK, and reopen.

Now we're going to add some more.

scriptname aaaJailScript

short Arrest

short Timer1
short Timer2
short Timer3
short Timer4
short Timer5

short StartDay1
short StartDay2
short StartDay3
short StartDay4
short StartDay5

Begin GameMode

;------------------------------------
;The script below deals with stopping combat against he PC, once the PC has paid for crimes.
;NPCs will sometimes try to fight the PC after crime has been committed. This script stops these fights.

If (Player.GetInWorldspace MegatonWorld == 1) && (aaaMegatonOfficerRef.Status != 8)
PlayerRef.StopCombatAlarmOnActor

EndIf

End


As noted, the StopCombatOnActor script will cause any angry NPCs (who are trying to kill our PC after too many crimes committed) to STOP combat once the PC is in Megaton's plaza area, assuming the Officer's Status is not 8 (meaning the PC has not been banned from Megaton, yet). This will allow the officer to attempt arresting the PC without hassle. If this script is not used, and NPCs are actively trying to fight our character, this causes the officer to get confused, unable to deliver any dialog.

Note that this is OPTIONAL. For those who want to have NPCs fighting their characters in Megaton's plaza area at any time after crime, this script can be omitted. Again, the officer won't be able to do his/her job if this script is not present.


3e). Close and save the script. Click OK, closing the quest window. Save from the main toolbar. Reopen the quest. More is going to get added to this main script, but for now let's move on.

Topics Tab
3f). Make a GREETING. This first greeting is going to be a generic sort which the officer says if the PC is not wanted for any crimes. "Lovely day, isn't it?" or whatever. Toggle Goodbye on. Conditions go like this...

GetMinorCrimeCount < 3.00 AND
GetMajorCrimeCount < 1.00 AND
GetIsID aaaMegatonOfficer == 1.00


And that is all. Since Goodbye is toggled on, the officer will say this if we speak to her or him, without any dialog menus popping up, just like speaking to a Megaton Settler.

3g). Make a second GREETING. This one is much going to be much more interesting. The officer will say this one when first confronting the PC, during the arrest process. "STOP!!! You violated the law!"... Make some dialog which explains that pickpocketing, stealing, trespassing, assaults, and murder are all against the law. "You can pay me caps, go to jail, or resist arrest..."

Three conditions are needed...

GetMajorCrimeCount >= 1.00 OR
GetMinorCrimeCount>= 3.00 AND
GetScriptVariable aaaMegatonOfficerRef.Status == 1.00 OR
GetScriptVariable aaaMegatonOfficerRef.Status == 6.00
GetIsID aaaMegatonOfficer == 1.00


3h). In this greeting's Choices window, add three topics: aaaPayCaps, aaaGoToJail, and aaaResistArrest. Add these into the Editor ID window, as well.


3i). Let's start with the least threatening of those three choices: Pay Caps can go into the Topic Text slot. "You're being arrested for committing one or more crimes against the citizens and settlers of Megaton.... you really need to watch yourself...." and so on. Type some text explaining how much will need to be paid. In my game, lesser minor crimes start at 50 caps, while a full-on repeated assault or murder can rate as high as a thousand. I went into some detail, making sure the officer explained all the rules in her dialog.

Overall, I wound up with four scenarios: lesser Minor Crimes, greater Minor Crimes, lesser Major Crimes, and greater Major Crimes. If a character commits just one assault, or steals a couple items (and is caught) lesser Major or Minor crime gets registered. It is possible for a well-meaning character to simply pay for this one crime, never commit another one, and "lesser" crime where his or her crime counts shall stay.

If more crime gets committed, more than one or two incidents, this causes a greater scenario of Minor and/or Major crimes. Here we have somebody who is more of a dedicated criminal, so here is where their reputation shall stay: paying more money if caught, and going to jail for longer periods, as well.

Basically, lesser crime is only committed once. If the character continues to commit more crime, all subsequent arrests will be considered greater.


Conditions: only one is needed, the same GetIsID aaaMegatonOfficer == 1.00 as before.

3j). In the Add Topics window, add aaaPayCapsTopic2. Conversely, this can be added into the Choices window, along with aaaGoToJail and aaaResistArrest, for those who wish to retain maximum options.

3k). Add aaaPayCapsTopic2 into the Editor ID, and change Topic Text to "I am paying for my crimes. Here are your caps."

Dialog should be written in a way which warns the PC. If NPCs have started combat, they will have ceased due to that StopCombat script added into the main script IF the PC is in Megaton's plaza area. But they might resume fighting our character once the PC is back in some other cell. So her dialog goes:"If you have enough caps to pay for your crimes, you will be free to go, but it might be a good idea to get out of town for awhile. I'd recommend 3 days or more..."


I have noted four scenarios for crime above. Overall, eight dialogs can be written for this topic; four for Minor Crime, and four for Major Crime. Let's start with Minor Crimes. Here are the four scenarios for lesser and greater Minor Crimes.

1). the PC has enough caps, and needs to clear less than 5.00 of minor crimes
2). the PC has enough caps and needs to clear 5.00 or more .. ." .. " .... "
3). the PC does not have 50 caps, for situation 1.
4). the PC does not have 100 caps, for situation 2.

Selections 1 and 2 require conditions as follows...

GetIsID aaaMegatonOfficer == 1.00 AND
GetMinorCrimeCount >= 2.00 AND
GetMinorCrimeCount < 5.00 AND
GetGold Reference: Player >= 50.00


or

GetIsID aaaMegatonOfficer == 1.00 AND
GetMinorCrimeCount >= 5.00 AND
GetGold Reference: Player >= 100.00


3l). In the Result Script (Begin) box, type Player.RemoveItem Caps001 50 or Player.RemoveItem Caps001 100 respectively.

3m). In the Result Script (End) box for lesser Minor Crime type Set aaaMegatonOfficerRef.Status to 2.

3n).In the Result Script (Begin) box for greater Minor Crime, add Set aaaJailFallout3Quest.Arrest to 5 below the Remove Caps script.

3o). In the Result Script (End) box for greater Minor Crime, add

Player.MoveTo aaaJailBookingXMarkerHeading
If (aaaMegatonOfficerRef.Status == 1)
Set aaaMegatonOfficerRef.Status to 4
EndIF



3p). The final two situations, in which there aren't enough caps, can use the same GetIsIDs and GetMinorCrimeCounts, all of those can literally be CopyAll/pasted. But change GetGold to less than 50 caps, or less than 100 caps, depending on the amount of Minor Crimes allotted.

For either of these situations, add aaaGoToJail and aaaResistArrest into their Choice windows.

Click OK and save.

Steps 3i through 3p can be followed for Major Crime as well, making whatever changes you'd prefer. Obviously, paying caps for an assault or murder will be much more serious. In my game, committing one or two assaults (less than 5.00 of Major Crime) will require 200 caps of payment. Committing more than two assaults indicates that somebody was aggressive enough to try killing somebody, or seriously maiming him or her. The officer is going want a thousand caps to clear one's name.

This may sound harsh, but consider the fact that no NPC in Megaton is ever going to assault one of our characters. Only the Player (us) can commit crimes in Fallout 3. We are always the instigators. In TES IV: Oblivion, some NPCs could commit crimes and pay for them with their lives, Tilmo the Stablehand and City Swimmer are two perfect examples. Since food was not added into their inventories, they'd occasionally try to fill their bellies, which meant they'd steal whatever they could. Beth made sure to "fix" this for Fallout 3, which means NPCs can never commit true crimes in this latter game.

Note that pwning Mister Burke should be okay, since he is not part of any Megaton factions. I have not tested this personally though
.

Conditions for the lesser Major Crime look like this...

GetIsID aaaMegatonOfficer == 1.00 AND
GetMajorCrimeCount >= 1.00 AND
GetMajorCrimeCount < 5.00 AND
GetGold Reference: Player >= 200


Conditions for greater Major Crime ...

GetIsID aaaMegatonOfficer == 1.00 AND
GetMajorCrimeCount >= 5.00 AND
GetGold Reference: Player >= 1000


And don't forget to add the appropriate amount of caps removed in the Result Script (Begin) box.

Add Set aaaMegatonOfficerRef.Status to 2 into the Result Script (End) for lesser Major Crime.

Add Set aaaJailFallout3Quest.Arrest to 5 in the Result Script (Begin) box for greater Major Crime.

Add ...

Player.MoveTo aaaJailBookingXMarkerHeading
If (aaaMegatonOfficerRef.Status == 1)
Set aaaMegatonOfficerRef.Status to 4
EndIF


...in the Result Script (End) box for greater Major Crime.

3q). Toggle Goodbye on for both. Click OK and save.

Unfortunately, the game does not separate assaults and murders into two separate categories; both of these are considered Major Crime. So at this writing, I do not know how to make murders much more serious (more time, more caps needed) from assaults. The game does include several functions which include Murder and Killer (such as IsKiller) but all of these require reference IDs on NPCs to work, instead of simply working globally. I'm not adding a reference to every NPC in Megaton, that's silly.

The answer for now is to set a higher level of Major Crime, which breaks down into lots of assaults or one (or more than one) murder, at least as far as dialog is concerned.


3u). Make a third GREETING for the officer. This will be the final one, which she says if spoken to, after an arrest process has been completed (caps paid, time spent in jail). In my game, she simply says "I've got my eye on you..."

3v).. Toggle Goodbye on. Conditions go like this...

GetIsID aaaMegatonOfficer == 1.00 AND
GetScriptVariable aaaMegatonOfficerRef.Status == 2.00 OR
GetScriptVariable aaaMegatonOfficerRef.Status == 5.00 OR
GetScriptVariable aaaMegatonOfficerRef.Status == 7.00



RENDER window
4a). Go into the jail's cell. In the Object window edit a note.

4b). Describe some rules about how crime works in Megaton, and what is expected of the prisoner upon release. Basically, this is a list of rules. Something which explains how long each sentence shall last, corresponding to what sort of crime has been processed. Anything which the character possessed before arrest has now been put into that Evidence Locker, so explain this in the note's text as well.

Since a robot is going to get added into the jail, add some text explaining that the robot is who we'll speak to for food, cigarettes, and also to get out of jail when the sentence is over. There will eventually be an actual game message which explains how to get out of jail, too. All of that is coming.

4c). Drag this note into the jail's cell, behind bars.


OBJECT window > Actor Data > Quest
5a). Go into the Topics tab and find aaaGoToJail. This topic is somewhat simpler than paying caps, fortunately. Four Infos will need to be written up instead of eight. Each of these four Infos correspond to lesser or greater Minor Crime, or lesser / greater Major Crime.

Go To Jail can be added into the Topic Text slot.

The first Info is going to be used for Minor Crime less than 5. For most characters who aren't full criminals, but have made a slip-up, this is going to be the jail term for a first offense. "You've made some mistakes, it happens. Just make sure it doesn't happen again." In my game, the penalty for this is just one day. "I hereby sentence you to the term of one day..." the officer says.

GetIsId aaaMegatonOfficer == 1.00 AND
GetMinorCrimeCount >= 2.00 AND
GetMinorCrimeCount < 5.00


Toggle Goodbye on.

5b). In the Result Script (Begin) type or paste

Set aaaFallout3Quest.Arrest to 1
aaaMegatonCellDoorRef.Lock 100
aaaMegatonCellDoorRef.SetOpenState 0
.

5c). In the Result Script (End) box type

Player.RemoveAllItems aaaEvidenceLockerRef
Player.AddItem OutfitWasteland01 1
Player.MoveTo aaaMegatonJailPlayerXMarker
Set aaaMegatonOfficerRef.Status to 2


All the PC's items are removed and stored into that locker. Any stolen items should have also been removed by this point, and erased entirely from the game, however, sometimes they might slip by the officer or any NPCs who initially witnessed any crime(s).

OutfitWasteland01 is what the PC wears while in jail. It is important to make sure RemoveAllItems comes before the player gets that jail outfit, otherwise the game will remove these clothes as well.



5d) Three more Infos can get added: one for Minor Crimes of 5.00 or more, one for Major Crimes of less than 5.00, and one for Major Crime of 5 or more. Technically, these greater major crimes can equate to attempted murder or actual murder. These three infos will tally three days, ten days, and one month in jail respectively.

5e). Let's start with Minor Crimes greater than 4.00. Dialog can be more menacing. Our toon has stolen or pickpocketed multiple items, or trespassed for an extreme amount of time, ignoring somebody's warnings about this. So the officer isn't so nice. "You dirty thief. You mongrel of a trespasser. You have committed several minor crimes against the residents of Megaton. You are going to be incarcerated for three whole days.... "

GetIsID aaaMegatonOfficer == 1.00 AND
GetMinorCrimeCount >= 5.00


5f). Now, Set aaaJailFallout3Quest.Arrest to 2 goes into the Result Script (Begin) box instead of aaaJailFallout3Quest.Arrest to 1. Make sure aaaMegatonCellDoorRef.Lock 100 goes into this box, as well.

5g). Three of the four scripts which went into the lesser Minor Crime Result Script (End) box can simply be copy/pasted. Do not copy/paste the aaaMegatonOfficerRef.Status script.

5h). Follow the same process for Major Crime, making sure to change Set aaaJailFallout3Quest.Arrest to 3 and 4 respectively, for lesser and greater. Everything else gets copy/pasted, but again, leave the officer's Status script out of greater Major Crime's (End) box.


Click OK and save. Now, to make the officers fight our character, if Resist Arrest is chosen.

Main toolbar > Character > Packages
6a). Start a new package. I'm going to name its ID aaaResistArrestPackage.

6b). Change Package Type to Use Weapon.

6c). Toggle Any Object on, and find whichever weapon the officer shall use in the Object ID scroll-bar. I put WeapPoliceBaton in there. The weapon used in this bar MUST also be a weapon in the officer's inventory, otherwise the officer will simply try to use their fists. Note that if the officer has a second weapon (such as a gun) the officer may switch to this weapon type, especially if the first weapon is a melee piece, and some distance is involved.

6d). Toggle Target on, and find PlayerRef in the Ref scrollbar.

6e). In the Fire Count area there are two choices: Repeat Fire will cause the officer to keep using that weapon indefinitely, as long as the package is running. Number of blows will cause them to stop after X number of weapon swings, or rounds have been fired.

6f). Flags tab: toggle Always Run, and Weapon Drawn on. Enable Fallout Behaviour gets toggled completely off.

6g). Click OK. This package should not be attached to the officer, it will (instead) be triggered through a script.

Reopen the Quest window.

7a). aaaResistArrest is the final topic, and it's the easiest of all; we only need one Info. Type some menacing dialog. Since a second officer is going to join beating down the PC, this dialog should include that information. "You want to resist? Fine. But now my deputy is going to assist!"

GetIsID aaaMegatonOfficer == 1.00 AND
GetMajorCrimeCount >= 1.00 OR
GetMinorCrimeCount >= 1.00


7b). In the Result Script (End) box type Set aaaMegatonOfficerRef.Status to 3

7c). Toggle Goodbye on, Click OK. save.


Note: If other Megaton NPCs have also begun to attack before the arrest, they will continue to do so, unless the main script gets modified to include Status 3 as well as Status 2! However, they generally will not follow us out into the Wasteland.

I and an online friend have experimented with Resist Arrest quite a lot, going in and out of various cells and whatnot, just to see how far the officers will keep following our characters, continuing pursuit. Since NPCs don't follow the PC very well into different cells in this game, it is possible to run into (let's say) Moriarty's and get a breather, maybe use a Stimpack, assuming no other NPCs are attacking. It is also possible to leave this portion of the quest as-is. Yes, the officers have trouble following, but the problem is, eventually they WILL follow. And they'll follow everywhere, including the wasteland.

This will get fixed later on via scripts. Or you can just leave it this way, for those who want to try to pwn the officers outside of society. If they happen to follow us outside of Megaton, and encounter some enemy. Let's say, a radscorp. They will focus then on fighting this radscorp instead of us. Eventually it'll be their doom, if this doesn't get fixed later on.

Another possibility is to make other referenced NPCs (such as Jericho and Lucas Simms) join in the fight while our toon resists arrest! I have not added this into my game, but for those who want to make a real hardcore option, this is possible too.

But first, here's how to get the officers to do their beat-down.


7d). Open up the main (arresting) officer's script. Some of what's below has already been written, if you've been following this guide so far. But some new material also gets added...

scriptname aaaEnforcementOfficerScript

; Status 0 -- Not enough crime witnessed. Officers sandbox. Most “good” PCs remain Status 0 forever.
; Status 1 -- The PC has possibly been caught committing their first crime, Major or Minor.
; Status 2 -- Caps paid or jail chosen for 'lesser' Minor or Major crime. PC stays in Megaton if caps paid.
; Status 3 -- Resist Arrest chosen. 3-day timer starts, officers fight PC if Megaton's plaza entered.
; Status 4 -- Caps paid for 'greater' Minor or Major crime. PC teleported to "booking" area of jail.
; Officers will revert to Status 3 if PC re enters Megaton, while Status is 4.

; Status 5 -- Timer concludes after 3 days, causing officers to sandbox. 5 Can result from Status 3 or 4.
; Status 6 -- Next-to-last arrest process. Works in similar way as Status 1.
; Status 7 -- Last strike. If PC is arrested during 7, cannot reenter Megaton without getting attacked.
; Status 8 -- PC is 'banned' from Megaton. :-(


short Status

Begin GameMode

;------------------------------------------------------------
; Status 1 handles the first "lesser" arrest process
; if PC is caught committing at least two Minor, or one Major crime.
; PC remains in Megaton

If (Status == 0) && (Player.GetInWorldspace MegatonWorld == 1)
If (GetMinorCrimeCount >= 3) || (GetMajorCrimeCount >= 1)
Set Status to 1

EndIf
EndIf

If (Status == 1)
aaaMegatonOfficerRef.AddScriptPackage aaaArrestPlayerPackage

EndIf

;---------------------------------
; Status 2 causes the main officer to sandbox after arrest has taken place from Status 0 to 1.
; Triggers from lesser crime.
; PC remains in Megaton, unless he/she also went to jail.

If (Status == 2)
If (GetMinorCrimeCount < 5) || (GetMajorCrimeCount < 4)
aaaMegatonOfficerRef.AddScriptPackage aaaMegatonOfficerSandbox

EndIf
EndIf

;---------------------------------
; This script causes main officer to arrest PC a first time (potentially) for greater crime / Status 0.
; Or a second time (potentially) if lesser crime already been processed.
; PC is teleported outside of Megaton to the jail's 'booking' area, and must stay out of town 3 days.

If (Status <= 2) && (Player.GetInWorldspace MegatonWorld == 1)
If (GetMinorCrimeCount >= 5) || (GetMajorCrimeCount >= 4)
Set Status to 1

EndIf
EndIf

;---------------------------------------

; Status 3 makes both officers beat down the PC after Resist Arrest is chosen
; The quest's main script starts a timer which ends after 3 days.
; Officers will cease attacking after 3 days

; The officers will only fight if the PC enters Megaton's plaza area.

If (Status == 3) && (Player.GetInWorldspace MegatonWorld == 1)
aaaMegatonOfficerRef.AddScriptPackage aaaResistArrestPackage
aaaComplianceOfficerRef.AddScriptPackage aaaResistArrestPackage
Set aaaJailFallout3Quest.Arrest to 5

EndIf

;--------------------------------------------------

; Status 4 causes officers to attack if PC enters Megaton before main script timer has reset Arrest 5.
; Arrest == 5 and Status 4 trigger through dialog, from Resist Arrest and/or greater Pay Caps.

If (Status == 4) && (Player.GetInWorldspace MegatonWorld == 1)
Set Status to 3

EndIF

;--------------------------------------------------

; Status 5 is similar to Status 2. Both remain "neutral" if PC commits no more crimes.
; IF PC gets caught during 5, will be wanted for arrest two or three times by now.

If (Status == 5) && (Player.GetInWorldspace MegatonWorld == 1)
If (GetMinorCrimeCount < 7) || (GetMajorCrimeCount < 8)
aaaMegatonOfficerRef.AddScriptPackage aaaMegatonOfficerSandbox
aaaComplianceOfficerRef.AddScriptPackage aaaMegatonOfficerSandbox

EndIf
EndIf

If (Status == 5) && (Player.GetInWorldspace MegatonWorld == 1)
If (GetMinorCrimeCount >= 7) || (GetMajorCrimeCount >= 8)
Set Status to 6

EndIf
EndIf

;-------------------------------------------------------
; Status 6 is the next-to-last stage of arrest. Three or four strikes, by now.
; Works similar to Status 1.

If (Status == 6)
aaaMegatonOfficerRef.AddScriptPackage aaaArrestPlayerPackage

EndIf

;--------------------------------------------------
; Status 7 could mean final arrest, and last straw.
; If PC gets arrested during this phase, he or she is essentially BANNED from Megaton.
; Similar to Status 5

If (Status == 7) && (Player.GetInWorldspace MegatonWorld == 1)
If (GetMinorCrimeCount <=9) || (GetMajorCrimeCount <= 12)
aaaMegatonOfficerRef.AddScriptPackage aaaMegatonOfficerSandbox
aaaComplianceOfficerRef.AddScriptPackage aaaMegatonOfficerSandbox

EndIf
EndIf

If (Status == 7) && (Player.GetInWorldspace MegatonWorld == 1)
If (GetMinorCrimeCount > 10) || (GetMajorCrimeCount > 12)
Set Status to 8

EndIf
EndIf

;--------------------------------------------
; Status 8 means PC cannot enter town w/o being attacked

If (Status == 8) && (Player.GetInWorldspace MegatonWorld == 1)
aaaMegatonOfficerRef.AddScriptPackage aaaResistArrestPackage
aaaComplianceOfficerRef.AddScriptPackage aaaResistArrestPackage
LucasSimmsRef.AddScriptPackage aaaResistArrestPackage

EndIF

; ----------------------------------------------------------------------
;The scripts below deal with keeping the officer from running up like a maniac when not under arrest.
;Status is 0 by default, assuming the PC hasn’t got a Crime Count when the jail mod is activated.

If (Status == 0)

aaaMegatonOfficerRef.AddScriptPackage aaaMegatonOfficerSandbox
aaaComplianceOfficerRef.AddScriptPackage aaaMegatonOfficerSandbox

EndIf

End



> Some may notice it is possible to 'break' the way these arrests progress from Status 0 to Status 8, especially with Minor Crime. If somebody is witnessed stealing something, and the witness, or witnesses, starts beating the crap out of our character, I am assuming our character will be like most thieves. Most thieves in this situation will be upset that they've been caught. They'll get the heck out of that cell.

However, it is possible for somebody to stay in that one cell and keep stealing stuff while being witnessed, causing Minor Crime to rise and rise and rise to the maximum level of 8. I am assuming most gamers aren't going to do this. This sort of criminal is going to be withstanding some sort of beating or shooting while he/she is stealing all these items.

IF somebody is going to take this route, so that the maximum level of crime is recorded right away, what'll happen is the officer will arrest the player-character once this character is done stealing, and walks back into MegatonWorld. The PC goes to jail or pays caps. Gets teleported out of town. Once the timer resets, and the PC reenters town, guess what? He / she will immediately be arrested again, since MinorCrimeCount is past where the scripts above can record. Maybe there will be a third and fourth arrest as well.

It is possible to fix this somehow, of course. Anything is possible with scripts. But I am not going to do this in my own game, because it's too much work, and I've already been working on this project for over 5 months! For me, the answer is simple. Any thief I roll won't want to stick around if he or she has been caught stealing.



MAKING THE JAILBOT


OBJECT window > Actors > Creature > Robot > Protectron

8a). Right-click > Edit CProtectron, and select an ID and Name. I am calling it aaaJailbot and Jail Bot. Get it?

8b). Toggle...
No low level processing off.
Respawn on.
Allow PC Dialogue on.

8c). Traits tab: All the scroll-bars have already been set, so leave these alone. Change Alignment to Good.

8d). Stats tab: The robot is set to Level 3 by default, so it's an easy one to beat, for those who wish to do so. Problem is, if it's been destroyed before the PC gets thrown in jail... I am setting it up so that this is a bad idea. Reason is, the jailbot is going to be the one who eventually unlocks the jail's cell door, through dialog. It will also dispense food, for those who use mods which require eating. So for those modders who wish to keep all of that intact, set the Jail Bot to Essential.

8e). Factions tab: Remove from RobotFaction and add into MegatonResidentFaction and MegatonCrimeFaction.

8f). AI Data tab: Unaggressive, Average, Helps Nobody, and Neutral are fine.

8g). AI Packages tab: Remove any AI packages. These are going to be added in a later tutorial.

Everything else (Inventory, etc.) can be kept as-is.

8h). Click OK, then drag the Jail Bot into the jail cell.

8i). Double left-click on the bot. Toggle Persistent Reference on. Click OK. Save.


FINISHING THE JAIL QUEST

OBJECT window > Miscellaneous > Message
9a). Right-click > New into the Editor ID window. The MESG panel pops up.

9b). ID can be aaaMinorCrimeOneDay. This is going to be used for minor crime less than 5.00. Copy that ID so it can be pasted into the main script later.

9c). Title can be Go To Jail. And for Message Text I just typed "I have been thrown in jail for one day."

Toggle Message Box off.

9d). The Time Displayed slot has been set to 2 by default, meaning that the message gets shown for 2 seconds. This ain't enough for my sorry eyes, so I boosted this to 20, just so I have enough time to read each message.

Click OK. Three more MESGs can be made, corresponding obviously to minor crime more than 4.00, Major Crime less than 5.00, or attempted murder.

9e). A final MESG can be made to indicate the jail term has ended. ID in my game is aaaFreeFromJail. Follow steps 7b through 7c to make a "My jail term has now ended" message.

9f). Hmm, one more message. I made aaaCrimeClearedMessage, which is going to show if the criminal resists arrest, or is moved out of town after paying caps. This message says "Three days have passed. It may be safe for me to reenter Megaton by now."


OBJECT window > Actor Data > Quest > Quest Data
10a). Reopen the main script. Here is what it'll look like in total.

scriptname aaaJailScript

short Arrest

short Timer1
short Timer2
short Timer3
short Timer4
short Timer5

short StartDay1
short StartDay2
short StartDay3
short StartDay4
short StartDay5

Begin GameMode

;------------------------------------
;Script below deals with stopping combat against PC, once PC has stepped into Megaton's plaza.
;NPCs will sometimes try to fight PC after crime has been committed. This script stops these fights.

If (Player.GetInWorldspace MegatonWorld == 1)
PlayerRef.StopCombatAlarmOnActor

EndIf

;------------------------------------------------------
;The script below deals with Minor Crimes of 4.00 or less
;This causes the PC to get locked in jail for 24 hours
; Officer's Status remains at 2.

If (Arrest == 1) && (Timer1 == 0)
Set Timer1 to 1
Set StartDay1 to GameDaysPassed
ShowMessage aaaMinorCrimeOneDay

EndIf
EndIf

If (Timer1 == 1)
If ((GameDaysPassed - StartDay1) >= 1)
Set Timer1 to 0
Set Arrest to 0

ShowMessage aaaFreeFromJail

EndIf
EndIf

;------------------------------------------------------
;The script below deals with Minor Crimes of 5.00 or more
;This causes the PC to get locked in jail for 3 days

If (Arrest == 2) && (Timer2 == 0)
Set Timer2 to 1
Set StartDay2 to GameDaysPassed
ShowMessage aaaMinorCrimeThreeDays

EndIf
EndIf

If (Timer2 == 1) && (aaaMegatonOfficerRef.Status == 1)
If ((GameDaysPassed - StartDay2) >= 3)
Set Timer2 to 0
Set Arrest to 0
Set aaaMegatonOfficerRef.Status to 5

ShowMessage aaaFreeFromJail

EndIf
EndIf

If (Timer2 == 1) && (aaaMegatonOfficerRef.Status == 6)
If ((GameDaysPassed - StartDay2) >= 3)
Set Timer2 to 0
Set Arrest to 0
Set aaaMegatonOfficerRef.Status to 7

ShowMessage aaaFreeFromJail

EndIf
EndIf

;------------------------------------------------------
;The script below deals with Major Crimes of 4.00 or less, namely assaults
;This causes the PC to get locked in jail for seven days.
; Officer's status remains at 2

If (Arrest == 3) && (Timer3 == 0)
Set Timer3 to 1
Set StartDay3 to GameDaysPassed
ShowMessage aaaMajorCrimeOneWeek

EndIf
EndIf

If (Timer3 == 1)
If ((GameDaysPassed - StartDay3) >= 7)
Set Timer3 to 0
Set Arrest to 0

ShowMessage aaaFreeFromJail

EndIf
EndIf

;------------------------------------------------------
;The script below deals with Major Crimes of 5.00 or more, namely excessive assaults and murders
;This causes the PC to get locked in jail for one month

If (Arrest == 4) && (Timer4 == 0)
Set Timer4 to 1
Set StartDay4 to GameDaysPassed
ShowMessage aaaMajorCrimeOneMonth

EndIf
EndIf

If (Timer4 == 1) && (aaaMegatonOfficerRef.Status == 1)
If ((GameDaysPassed - StartDay4) >= 29)
Set Timer4 to 0
Set Arrest to 0
Set aaaMegatonOfficerRef.Status to 5

ShowRaceMenu
ShowMessage aaaFreeFromJail

EndIf
EndIf


If (Timer4 == 1) && (aaaMegatonOfficerRef.Status == 6)
If ((GameDaysPassed - StartDay4) >= 29)
Set Timer4 to 0
Set Arrest to 0
Set aaaMegatonOfficerRef.Status to 7

ShowRaceMenu
ShowMessage aaaFreeFromJail

EndIf
EndIf

;-------------------------------
;The script below is what cancels the Officers' Resist Arrest AI, causing them to mellow.
;This allows us to reenter Megaton.

If (Arrest == 5) && (Timer5 == 0)
Set Timer5 to 1
Set StartDay5 to GameDaysPassed

EndIf
EndIf

If (Timer5 == 1) && (aaaMegatonOfficerRef.Status <= 4)
If ((GameDaysPassed - StartDay5) >= 3)
Set Timer5 to 0
Set Arrest to 0
Set aaaMegatonOfficerRef.Status to 5

ShowMessage aaaCrimeClearedMessage

EndIf
EndIf

If (Timer5 == 1) && (aaaMegatonOfficerRef.Status == 6)
If ((GameDaysPassed - StartDay5) >= 3)
Set Timer5 to 0
Set Arrest to 0
Set aaaMegatonOfficerRef.Status to 7

ShowMessage aaaCrimeClearedMessage

EndIf
EndIf


End



Note Arrest 4. When its timer concludes, ShowRaceMenu allows us to change our character's hairstyle / looks. After a month in jail, hair probably won't look the same.


10b). Save, Click OK (closing the Quest window) and save.

The final touch is to give the Jail Bot some dialog and responsibilities. This bot will be in charge of feeding the PC, dispensing cigarettes, and finally, unlocking the jail. I am also going to give the Jail Bot a Patrol package. Patrols get described in the post directly below this one.

OBJECT window > Actor Data > Quest > Topics tab

Start a new quest. This quest needs to be separate from the Jail quest already written. Keep in mind that the way I am writing this will make the PC stay in jail in REAL TIME. ph34r.gif This idea is hardcore, of course. Those who want to spend all their time at once can simply sleep in the bed over and over, or come up with a way to move time forward more quickly, somehow.

11a). Three GREETINGs are needed. First one will deal with dinner. The PC is going to have a choice of eating, not eating, or getting a pack of cigarettes. "You ... look ... starved. Want .... some .. grub?" goes the dialog.

11b). Toggle Say Once a Day on.

11c). Conditions are as follows...

GetCurrentTime > 17.000 AND
GetCurrentTime <= 22.000 AND
GetIsID aaaJailBot == 1.00


Note that the Jail Bot will dispense food or ciggies even if the PC is not in jail. To fix this, add another short variable into the main script. Call it Incarceration. You'll then need to go through the rest of the main script, adding Set aaaJailFallout3Quest.Incarceration to 1 for each of the four timers. A GetQuestVariable can then be added to the topic for food & cigs. Make sure to turn this off once the PC gets out.

11d). In the Choices window, add aaaFoodYes, aaaFoodNo, and aaaSmokingTopic. Or any other topics desired.

11e). Let's start with aaaFoodYes. "Yes I am hungry" can go into the Topic Text slot. "We have an .... excellent. Selection of .... all kinds of grub," says the Jail Bot.

Toggle Say Once a Day and Goodbye on.

11f). The same conditions can be copy-pasted from the bot's initial GREETING.

11g). In the Result Script (End) box, type whatever is desired. I am adding. Player.AddItem JunkFood 1, Player.AddItem BrahminSteak 1, and Player.AddItem NukaCola 1.

11h). "No I am not hungry," can go into the Topic Text slot for aaaFoodNo. This is for roleplaying only, for those who have a toon who is some sort of hunger strike.

Only the bot's GetIsID is needed here. Toggle Goodbye on. Toggle Say Once a Day on.

This post has been edited by Renee: Jun 19 2022, 05:53 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic
Renee   Renee's Modding Thread   Feb 25 2018, 01:30 PM
Lady Saga   Tip: For Oblivion, Always use [url=https://www.nex...   Feb 25 2018, 01:35 PM
Renee   The Fetch Quest, Game: TES IV: Oblivion. So this...   Feb 25 2018, 01:51 PM
ghastley   The problem with the YouTube tutorials is that the...   Feb 25 2018, 04:25 PM
Renee   Awesome, ghastley. The problem with the YouTube...   Feb 25 2018, 05:18 PM
SubRosa   Excellent fetch tutorial Renee! I will probabl...   Feb 25 2018, 05:41 PM
Renee   Thank you. I tend to write up everything I do step...   Feb 25 2018, 11:40 PM
Renee   [color=green]The Kill Quest, Map Markers, and X ma...   Mar 2 2018, 11:16 PM
Turija   Great thread. I will have to think about what I c...   Mar 7 2018, 11:58 PM
Renee   Sweet Turija! See, I just learned a few new th...   Mar 8 2018, 02:53 AM
Renee   [b]How to repair Hair, Game: TES IV: Oblivion Thi...   Mar 13 2018, 02:27 AM
Renee   [color=#FF6600]How to make an NPC Vendor & Mec...   Mar 18 2018, 06:29 PM
Renee   [color=white]How to fix "Missing flowchartx32...   Mar 25 2018, 05:20 PM
ghastley   FWIW, you CAN paste into the command prompt window...   Mar 26 2018, 03:06 PM
Renee   Okay thanks, ghastley. I'll see if this works ...   Mar 29 2018, 05:18 PM
Renee   How to make a Fetch Quest (with multiple items). G...   Mar 31 2018, 11:36 PM
Renee   Each exterior cell is 4096 units by 4096 units or ...   Apr 3 2018, 02:56 PM
ghastley   At some time in the past I did a tutorial on how t...   Apr 10 2018, 07:33 PM
Renee   That'd be great. :)   Apr 10 2018, 08:15 PM
Renee   [color=#009900]Making a weather-changing item. Gam...   Apr 24 2018, 12:19 AM
Renee   [color=#996633]Faction-changing Armor and Clothing...   May 13 2018, 07:53 PM
Renee   Making an NPC Follower Game: Fallout 3 Note: this...   May 29 2018, 01:25 AM
Renee   Timer Scripts. Game: TES IV: Oblivion or Fallout 3...   Jun 10 2018, 11:53 PM
Renee   [b]Making a house for sale or rent. Game: TES IV: ...   Jun 24 2018, 03:37 AM
Renee   Cripes, it's been since JUNE since I've ad...   Aug 12 2018, 04:13 PM
Renee   [color=#CC9933]Gun Tutorial Game: Fallout 3 This ...   Aug 26 2018, 08:52 PM
SubRosa   Ignores Normal Weapon Resistance is a holdover fro...   Aug 26 2018, 08:59 PM
Renee   Thanks. I changed the info in my previous post. ...   Sep 2 2018, 12:55 PM
Renee   Another tip for making these bounty quests: I like...   Sep 29 2018, 06:50 PM
Renee   This post goes with the one above, and is going to...   Oct 12 2018, 02:41 AM
Renee   [color=green]Lizard Men! -- Game: TES IV: Obli...   Oct 25 2018, 10:59 PM
Lopov   Nice! :goodjob: I'll be using this mod whe...   Oct 25 2018, 11:25 PM
Renee   So it's possible to encounter them in Lake Ru...   Oct 26 2018, 12:04 AM
Renee   Making an NPC Vendor / Repairist. Game: TES IV: Ob...   Oct 28 2018, 02:08 AM
Renee   [b]SEQ Files, Game: TES V: Skyrim Requires the TE...   Oct 29 2018, 12:17 AM
Renee   [color=#996633]Making FOMODs through Fallout Mod M...   Nov 11 2018, 04:32 PM
Renee   ` Making an NPC follower Game: TES V: Skyrim ...   Dec 1 2018, 06:40 PM
Renee   [b]Making an NPC Vendor Game: TES V: Skyrim [b]1...   Dec 5 2018, 02:59 AM
Renee   Making a Book bump a quest stage Game: TESV: Skyri...   Dec 15 2018, 02:39 AM
Renee   [b]Skyrim Quest Tutorial (WORK IN PROGRESS, do no...   Dec 17 2018, 12:02 AM
Renee   Repeatable Bounty Quests II (innkeeper involvemen...   Dec 29 2018, 04:04 PM
mALX   This is an Awesome thread, Renee!!!   Jan 14 2019, 07:56 PM
Renee   Awesome, thanks so much. :) --------------------...   Jan 19 2019, 08:25 PM
Renee   Setting up a gamepad controller Game: Elder Scroll...   May 15 2019, 12:53 AM
mALX   Awesome! You got it working! By the wa...   May 15 2019, 01:55 AM
Renee   Awesome, thanks. I have noticed there's TONS o...   May 15 2019, 01:05 PM
Renee   Game: Fallout 3, How to use Zone Triggers to set q...   Jun 19 2019, 02:28 AM
Renee   How to transfer saves from Xbox to PC, Games: Obli...   Jun 26 2019, 12:10 PM
Renee   Making a generic NPC Enemy, [color=white] Game: TE...   Oct 29 2019, 10:53 PM
Renee   Repeatable Bounty Quests Game: [color=white]TESV: ...   Jan 5 2020, 05:47 AM
Renee   Repeatable Bounty Quests, How to add new locations...   Jan 29 2020, 01:46 AM
mALX   These are awesome tips! Thanks Renee!   Jan 5 2020, 06:26 PM
SubRosa   Wow. That is amazing.   Jan 5 2020, 07:54 PM
Renee   aw, well thanks. I appreciate your encouragement,...   Jan 5 2020, 10:48 PM
Renee   SetActorOwner https://www.creationkit.com/index.p...   Apr 1 2020, 11:43 PM
SubRosa   You can use this at the console. It is a great way...   Apr 2 2020, 12:28 AM
Renee   You can use this at the console. It is a great wa...   Apr 2 2020, 12:33 AM
Renee   USE THIS idea for Fallout3_Jail.esp. We're goi...   May 31 2020, 05:11 PM
Renee   Making a Patrol package. [color=#993300]Game: Fall...   Jun 20 2020, 04:55 PM
Renee   Horse Rentals. Game: [color=#006600]TES IV: Oblivi...   Jul 26 2020, 06:07 PM
Renee   Getting an Xbox controller to work on PC. Game: [c...   Jun 11 2021, 12:47 AM
Renee   [color=#996633]Trigger Zones, Game: Fallout 3 Fal...   Sep 27 2020, 12:47 AM
Renee   https://www.youtube.com/watch?v=wj6qGCT4isg...nnel...   Sep 28 2020, 02:55 PM
Renee   https://web.archive.org/web/20130429160307/...Obje...   Oct 29 2020, 11:17 PM
Renee   I have found a really good Daggerfall tutorial whi...   Nov 28 2020, 03:00 AM
Renee   More Dynamic NPCs! Game: [color=#663366]TES II...   Jun 24 2021, 02:36 AM
Renee   Getting the Take All button to work, Game: [color=...   Aug 20 2021, 06:40 PM
Renee   Setting fallback cell (instead of Tiber Septim) h...   Sep 1 2021, 01:12 PM
Pseron Wyrd   https://web.archive.org/web/20200218144220/...a-s...   Sep 1 2021, 04:32 PM
Renee   I agree, Wyrd. Now that I know why random stuff sh...   Sep 2 2021, 01:58 AM
Renee   Random Console Commands, Game: TES V: Skyrim This...   Jan 23 2022, 03:36 PM
Renee   How to make a ForceGreet. Game: [color=white]TES V...   Jan 23 2022, 07:24 PM
Lena Wolf   I thought this thread was for Oblivion? ;) Never m...   Jan 25 2022, 03:57 PM
Acadian   I thought this thread was for Oblivion? ;) ... P...   Jan 25 2022, 05:30 PM
Lena Wolf   Well, there are of course a lot of similarities be...   Jan 25 2022, 05:41 PM
Renee   Lena has a point. Maybe this thread can be moved t...   Jan 25 2022, 06:12 PM
Acadian   Okay, the mod projects forum is simply a collectio...   Jan 25 2022, 07:22 PM
Renee   Thanks, paladin!   Jan 25 2022, 08:44 PM
Renee   How to use the PC's face for an NPC. [color=wh...   Mar 13 2022, 10:11 PM
Renee   How to add a bounty to the Player via script. Gam...   Apr 1 2022, 01:21 AM
Renee   How to add the Player or NPC into a Faction via sc...   Apr 3 2022, 02:39 AM
Renee   How to fix "failed to load snowflake: Meshes...   Nov 27 2022, 04:20 PM
Renee   Installing Morrowind from Scratch Recently I had ...   Dec 3 2022, 02:53 AM
macole   Those Intervention scrolls sure come in handy. I ...   Dec 3 2022, 07:59 AM
Renee   Oops, I screwed up. :whistle: Was cleaning the nex...   Dec 3 2022, 02:26 PM
Renee   Get a Job! Game: [color=white]TES V: Skyrim I...   Dec 11 2022, 11:41 PM
Renee   Traveling with an NPC. Game: TES V: Skyrim Here...   Jan 21 2023, 07:32 PM
Renee   Traveling with an NPC, Additional Locations. Game:...   Feb 10 2023, 03:07 PM
Renee   Traveling with an NPC, Additional NPCs. Game: [col...   Feb 13 2023, 01:58 AM
Renee   Dialog Speech Checks Game: [color=#FFFFFF]TES V: S...   Mar 3 2023, 03:58 AM
Renee   Map Marker Tutorial, Game: Fallout 3 Firstly, wit...   Mar 19 2023, 05:52 PM
Renee   Repeatable Enemy Raids, Game: Fallout 3 I love ge...   Mar 26 2023, 07:31 PM
Renee   Repeatable Enemy Raids, Additional Locations. Game...   Apr 2 2023, 06:36 PM
Renee   Gray Face bug. Game: [color=#FFFFFF]TES V: Skyrim ...   Apr 23 2023, 01:50 AM
Renee   Script Fragments. Game: [color=white]TES V: Skyrim...   May 19 2023, 06:54 PM
Renee   Fixing the Sideways Glasses Bug, Game: [color=#663...   May 26 2023, 10:29 PM
Renee   Nexus Mod Manager - installing and uninstalling Y...   Jun 8 2023, 08:02 PM
Renee   Breton Magic Resistance Tweak, Game: [color=#66333...   Jun 21 2023, 12:03 PM
Renee   Manipulating Leveled Lists Here is how to change ...   Jun 24 2023, 07:29 PM
2 Pages V  1 2 >


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 5th May 2024 - 12:31 AM