Jump to content

How do you make the wastelanders live with you


Kyle Z 1

Recommended Posts

Ok so basically i am making a town and i want the wastelanders or characters that i choose have a diaulouge option that would say "you can work for me in my town and live there" how would i do that then make them actually live their????

 

also is it possibile and how do you do it if it is but have an ever expanding town be it up or down based on how much money you put into it such as making a new city with only 2 houses but the more money and people live their the bigger it gets how would i do this

Link to comment
Share on other sites

This would require a very extensive amount of scripting tied into a quest. You would have to have variables assigned to detect how many people are living there, also for how much money you add to the town. Then you would have to have a group of buildings/objects to be enabled when the variable gets to a certain number. Also, if you have the chance of the town getting smaller you'd need to detect when the variable drops below a number.

 

As for the dialogue, it's just setting up basic dialogue and then setting a variable (if they agree) to 1, after that a part to detect whether or not the player is in the same cell as the NPC, and if the player isn't, it moves to NPC to a marker. That's to prevent the NPC from suddenly dissapearing.

 

Like I said it'd be a rather complex script but if you're still willing I think I could give you a basic run-down of the syntax required to get you started, though without testing it myself it'd be hard to say if it'd work flawlessly.

Link to comment
Share on other sites

yes i would be very willing to take the help you got man you already helped me with most of my questions ive never done modding before so i think just even playing with it is a big help for me thank you just let me know what to do i and i will obviously credit you for it if it works.
Link to comment
Share on other sites

Alright, this is a rough script and might require some tweaking. It would have to be attached to a quest in order for it to work. We'll call the quest TEQ for Town Evolution Quest.

 

ScriptName TownEvolution

Short Money
Short Citizen
Short CitizenAgree01
Short DoOnce01
Short CitizenAgree02
Short DoOnce02
;Repeat Short CitizenAgree for each Citizen the player can convince to move into the town.
;Repeat Short DoOnce for each Citizen the player can convince to move into the town.

Begin GameMode

If CitizenAgree01 == 1 && DoOnce01 == 0
 If CitizenReference01.GetInSameCell Player == 0
 CitizenReference01.MoveTo MarkerReference01
 Set DoOnce01 to 1
 EndIf
EndIf

;Repeat for each Citizen, changing the "01" to required number.

If citzen >= 20
Reference01.Enable
Endif

If Citizen >= 30
Reference02.Enable
Endif

If Citizen >= 40
Reference03.Enable
Endif

If citizen >= 50
Reference04.Enable
Endif

;Repeat for amount of citizens required for next object to be enabled

If Money >= 500
Reference05.Enable
EndIf

;Repeat for as much money as desired for objects to be enabled.
;Cannot refer to the same References as the Citizen Short.

If Money <= 500
Reference05.Disable
EndIf

;Disables reference is Money drops below a certain value if Money is allowed to drop. Repeat as desired for all values

If Citizen <= 50
Reference04.Disable
EndIf

;Disables Reference if Citizen drops below required amount. Repeat as desired for all values.

End

 

For each Citizen that agrees to live in your town you would have a script result attatched to the person's dialogue that has this line:

set TEQ.Citizen to TEQ.Citizen + 10
Set TEQ.CitizenAgree01 to TEQ.CitizenAgree01 + 1

 

What this would do, is when the Citizen agrees to live in your town it would add 10 to the Citizen short in the TownEvolution script and enable the first reference (since the minimum required value is 10). It would then set the CitizenAgree01 to 1 so the script can move the Citizen to the required location when the player is no longer in the same cell as the citizen (so the player doesn't see the citizen disappear into thin-air). Also, the citizen would need to be a persistent reference with the Reference of say CitizenReference01 (this can be anything you want, but the script above would need to change to reflect this)

 

Next you would need to set up result scripts attached to dialogues for each of the amounts of money the player can 'donate' to the town. The script would look like this:

 

Player.RemoveItem gold001 ##;## Means amount of gold to have removed
Set TEQ.Money to TEQ.Money + ##;## Is the amount of gold the player has donated

Link to comment
Share on other sites

sweet awesome i get where this went but two questions i want the people to live in say test area so does this make them go there or is that something else and where would i use the scripts im sorry im a noob at this haha do you want me to make the town where i want them to live then send it to you and you can teach me you are awesome man again i know you got your thing to do and i really appericate the help

 

also dont i have to have a inteior model for each change so in your script if its reference 4 dont i need to link the specific inteior to it

Link to comment
Share on other sites

Alright, to answer your initial question you will need a separate XMarker for each of the Citizens. The reference on the XMarker will be the MarkerReference referred to with the MoveTo command. This will move than citizen to wherever the Xmarker is placed. (XMarkers, by default, are set as persistent reference. You only need to give them a referenceID)

 

As for the buildings, you would build them normally, the exterior, the door, the interior, and link both doors. Then, you make the building itself a persistent reference and give it a ReferenceID THEN, make the DOOR a child of the building (by double clicking the door and going to Enable Parent, select reference in render window, then double clicking on the building when the crosshairs turn white. If they don't, your building is NOT set as persistent.)

 

Then all you have to do is call up the Building's ReferenceID with the script (Reference01.Enable, change Reference01 to the ReferenceID you gave your building) and when Reference01 is Enabled or Disabled, the door will be too, since the door is a child of the building.

 

This won't cause any issues with the link since the door technically exists, the player just cannot see nor interact with it. So, no, you do not need to call up the interior in any way with the script.

 

Bit of warning though. Since this will be an 'expanding town mod' much like my Evanore mod, I tell you this out of experience. Before you even BEGIN to write the script build ALL of the exterior work for the town! Place all the buildings and all the doors EXACTLY how you want to, then start doing the script. It'll be much, much easier for you to accomplish it this way than placing each building one at a time and adding the lines into the script one at a time.

Link to comment
Share on other sites

thank you so much man as a noob to modding i actually understand so you have everything built but you make it appear as it is called for in the script and i can expand that script and the x will make them go their last question though 2 more actually

 

I am currently working on an enclave room but the catch is it can only be accesed thourgh a door that you can hold in your inventory same as the experimental vault tec safe mod but a door instead of a safe how do i make a door a dropable item and they will go to the x fine but will they assume that is their home?? such as visit the buildings or is that more scripting i have to figure out but i really again appericate all the help

Link to comment
Share on other sites

You would have to create a new item, use whatever object you like that can already be picked up (maybe a Stealthboy model for the techie look?) do this by finding your desired object, right clicking, then Edit. change the ID of the item and hit okay, then say YES to make a new form! YOU MUST SAY YES WHEN ASKED TO CREATE A NEW FORM!

 

After that you need to create an Object script which will look like this.

 

Scn EnclaveTeleporterScript;SCN is short for Scriptname, it still works the same

Begin OnActivate

Player.MoveTo MarkerReference

End

 

Now, what happens is when the player left clicks the object in their inventory they will be teleported to the Xmarker that you designate (I would actually recommend using a HeadingMarker, point the arrow in the direction you want the player to be facing when they're teleported there)

 

They can also drop the item if they wish without being teleported. However, I'd recommend forcing the player to keeping the item in their inventory (to get in AND out of the interior) by using this script.

 

Scn EnclaveTeleporterScript

Short Teleport

Begin OnActive

If Teleport == 0
 Player.MoveTo MarkerReference
 Set Teleport to 1
Else
Player.MoveTo ExitMarkerReference
Set Teleport to 0
EndIf

End

 

Basically what happens is the first time the player uses the item to teleport the script detects that it hasn't been used before (Since Teleport is set to 0). It then teleports the player to your Marker and sets the Teleport short to 1. Now, the SECOND time the player uses the teleporter the script notices that the Teleport short is set to 1 (because of our If Teleport == 0 and Else commands) it teleports them out of the base to wherever you place your Marker (There might be a way to return the player to the same location they were before when using it, I'll see if I can remember) and sets Teleport BACK to 0 so the next time they use it they'll be teleported back into the interior.

 

 

Edit: Oh, right. Almost forgot. You need to attach the script to the object. This can be done in the baseID edit window (when you right click an object in the Object Window and then edit)

 

Edit2: Actually, it'd probably be safest to NOT use a consumable item as the base, since I don't know how to prevent it from being removed from the inventory once it's used. I'd use an item under the MiscItem menu, since the Begin OnActivate would still work and the item wouldn't be removed from the inventory.

Link to comment
Share on other sites

Awesome i will get to work on both my mods and thank you again for all your help but their was one more thing that i needed i asked about the x marker from the town mod the npc will got to that spot but will they see that that town is now their home or what do i have to do to make them "live" their such as visiting the stores and living in a house such as if i have a wastlander he will have his own bed???? thank you again i dont know if you are busy or anything but i really do appericate the help
Link to comment
Share on other sites

Eh, not really that busy. All I have to do right now is working on my own mod, no big deal.

 

Anyway, now you're getting into some more complex stuff. I can't think of a real easy way off the top of my head to get the NPCs to do what you want (with AI packages, such as eating, sleeping, offering services) after a condition is met. I'll take a look through the conditions and see if there's anything that can be used to do this based on the dynamic methods used in your mod for recruiting the NPCs.

 

 

Just figured it out. Simple really. You'll have to add yet another line to the quest script after each citizen is moved so each block will look like this:

 

If CitizenAgree01 == 1 && DoOnce01 == 0
 If CitizenReference01.GetInSameCell Player == 0
 CitizenReference01.MoveTo MarkerReference01
 Set DoOnce01 to 1
 Citizen01ID.SetFactionRank EvolutionCitizens, 1
 EndIf
EndIf

 

Where I used Citizen01ID you would put the ActorID NOT referenceID.

 

Then, make a new faction and call it EvolutionCitizens (or whatever you want) and make just one rank. (rank 1)

 

Now, what you'll have to do is make all the AI Packages for the citizens (both before AND after being recruited)

 

For the ones that are used AFTER they're recruited you will use the condition GetFactionRank == 1. That means that they will NOT use that ai package until AFTER they're added to the faction.

 

For the AI PAckages you want to run BEFORE you recruit them you will use the condition GetFactionRank < 1. Since this will return 0 (Lower than 1) they will use THOSE ai packages instead.

 

Finally, if you want to give NPCs the ability to leave your town (they get mad, don't like you, whatever reasons) you would have to add Citizen01ID.SetFactionRank, -1 to remove them from the Citizen Faction (so they'll revert back to using the 'pre recruited' AI packages)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...