Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Can't figure out this bed rental thing...


sugarsickness
 Share

Recommended Posts

Hi, I'm really new to modding (as in... I just started less than a week ago!) and I'm trying to figure out how to implement an inn into the small settlement I'm building. I thought I had followed this tutorial right, but it won't let me save the code, and gives me a "Script Publican_ToLTavern_Daisy', line 14: Script command "01OakInnDoor.unlock" not found" warning. So... which script command SHOULD I be using? Am I wrong for using the Reference Editor ID? If I am, what should I be using instead, and is there anything special I should be doing? :shrug:

Scriptname Publican_ToLTavern_Daisy


short rent		

short rentday	

short cleanup	

short setup		


begin gamemode


if ( rent == 1 )		

		if ( setup == 0 )

			set rentday to GameDaysPassed

			set setup to 1

			01OakInnDoor.unlock

			01OakBed.SetOwnership

		else

			if ( GameDaysPassed != rentday )

				set cleanup to 1

			endif

		endif

	if Player.GetinCell 011ShadeOakInn == 0

		if ( Cleanup == 1 )

			set Cleanup to 2

		endif

	endif


	if ( Cleanup == 2 )


	;resets The Variables


		set rent to 0

		set setup to 0

		set rentday to 0

		set cleanup to 0


		01OakInnDoor.SetOpenState 0

		01OakInnDoor.lock 30

		01OakBed.SetOwnership DaisyInn

	endif

endif


end

				

Edited by sugarsickness
Link to comment
Share on other sites

EDIT: What Rider said, reference names can never start with a number. Make it OakInnDoor01 instead, or something like that.

01OakInnDoor is supposed to be a refence name. You have a door that this script controls in a cell somewhere, then you bring up the properties for that door (double left click), put 01OakInnDoor in the reference name at the top and tick the 'persistent reference' checkbox.

Same thing with 01OakBed, find the bed that needs that reference name.

then it should save.

  • Upvote 1
Link to comment
Share on other sites

Ah ok, that fixed the saving problem. I'll remember to not put numbers in front of references anymore!

I'm still having trouble with getting the bed renting to work, but the issue of it not being able to be saved if fixed ;)

edit:

I totally figured out that I had forgotten to actually *put* my script onto the NPC. Haha. /facepalm

Thanks for the replies earlier though! :)

Edited by sugarsickness
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...