Dimitrisgb Posted January 17, 2021 Author Share Posted January 17, 2021 I am talking about an NPC that I made. It's not one of the original characters of Oblivion. The script was about renting a bed. I could not make it happen, so I made it remove, for a while, an object that functions as a door. But, apparently it was permanent. Link to comment Share on other sites More sharing options...
Striker879 Posted January 17, 2021 Share Posted January 17, 2021 I am talking about an NPC that I made. It's not one of the original characters of Oblivion. The script was about renting a bed. I could not make it happen, so I made it remove, for a while, an object that functions as a door. But, apparently it was permanent. Doors (at least load doors) get baked into your save. Only way to test changes is to use a save that has never had any contact with the door you are testing. Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted January 17, 2021 Share Posted January 17, 2021 To disable and enable an object you need to give it a cell-specific reference and use the cell reference .enable/disable functions in a script or a scripted dialogue. Link to comment Share on other sites More sharing options...
Dimitrisgb Posted January 17, 2021 Author Share Posted January 17, 2021 To disable and enable an object you need to give it a cell-specific reference and use the cell reference .enable/disable functions in a script or a scripted dialogue.I have given it a reference .enable function, bit still, it stays disabled. Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted January 17, 2021 Share Posted January 17, 2021 Which way did you do this? I'd like to see your script. Link to comment Share on other sites More sharing options...
Pellape Posted January 18, 2021 Share Posted January 18, 2021 (edited) The DoorSomething similar did happen to my house mod in Morrowind, a door disappeared when I modded the house, extremely annoying and I never touched that door as it was still in CS, so I had to make a copy of the door and place it again. So maybe you could try to make a new door? Well try this:Get the reference to the door from CSRun the game and open consoleType <Prid refenumber>Enable The InnkeeperTo make an innkeeper you need to do more things then edit scripts. I checked the old thread and we did not get far in it. So do you wanna try to make a fully functional innkeeper? I cannot promise we will succeed but we can try as I have mentioned before, they are not as easy to make as it looks like.Script at the Innkeeper3 different Dialog topics and the innkeeper must be member in themI also only use the old CS, so I do not know exact how to do things in ECS, which you are using Edited January 18, 2021 by Pellape Link to comment Share on other sites More sharing options...
Dimitrisgb Posted January 18, 2021 Author Share Posted January 18, 2021 OK, here is what I wrte at the first place: Scriptname VALAdhrisa ;CellName: VALRoadTripInn;Publican: VALAdhrisa;Room: First room upstairs on the left;Door Ref: BedTapestry short rentshort rentdayshort rentmonthshort cleanupshort setup begin gamemode if ( rent == 1 ) if ( setup == 0 )set rentday to GameDayset rentmonth to GameMonthset setup to 1BedTapestry.disable else if ( GameDay != rentday )set cleanup to 1elseif ( GameMonth != rentmonth )set cleanup to 1endifendif if ( Player.GetinCell VALRoadTripInn == 0 ) if ( Cleanup == 1 )set Cleanup to 2endifendif if ( Cleanup == 2 ) set rent to 0 set setup to 0set rentday to 0set rentmonth to 0set cleanup to 0BedTapestry.enableendifendif End And here is another attempt: Scriptname VALAdhrisa short rent begin gamemode if ( rent == 1 ) if ( setup == 0 )set rentday to GameDayset rentmonth to GameMonthset setup to 1BedTapestry.disable else if ( GameDay != rentday )set cleanup to 1elseif ( GameMonth != rentmonth )set cleanup to 1endifendif if ( Player.GetinCell VALRoadTripInn == 0 ) if ( Cleanup == 1 )set Cleanup to 2endifendif if ( Cleanup == 2 ) set rent to 0 set setup to 0set rentday to 0set rentmonth to 0set cleanup to 0BedTapestry.enableendifendif End Link to comment Share on other sites More sharing options...
Pellape Posted January 18, 2021 Share Posted January 18, 2021 (edited) Oki. Let us use script 1 as you did deleted some variable declarations that must be in the script in the scrtipt 2, otherwise they do look the same. Lets me check the script in Notepad++ and tab it, so it gets easier to read.The reason we tab it, is to see where the if sections starts and end... It has become a habbit since I started with coding 30 years ago... :wink: Scriptname VALAdhrisa ;CellName: VALRoadTripInn ;Publican: VALAdhrisa ;Room: First room upstairs on the left ;Door Ref: BedTapestry short rent short rentday short rentmonth short cleanup short setup begin gamemode if ( rent == 1 ) if ( setup == 0 ) set rentday to GameDay set rentmonth to GameMonth set setup to 1 BedTapestry.disable else if ( GameDay != rentday ) set cleanup to 1 elseif ( GameMonth != rentmonth ) set cleanup to 1 endif endif if ( Player.GetinCell VALRoadTripInn == 0 ) if ( Cleanup == 1 ) set Cleanup to 2 endif endif if ( Cleanup == 2 ) set rent to 0 set setup to 0 set rentday to 0 set rentmonth to 0 set cleanup to 0 BedTapestry.enable endif endif End What I see as a problem is that the script has the same name as the Publician. Is VALAdhrisa the name of the reference? We must make sure that we can clearly see them apart so they cannot confuse us. I do suggest you use script 1 again but rename it to scn VALAdhrisaSCR and rename the Persistent Reference VALAdhrisa to VALAdhrisaREF, as she is Persitent and named right? What ye think? It seems NPC's are always Persistent but you must name the Reference like this (Or similar) to be able to call its script from elsewhere, like from the dialog. I do suggest the name VALAdhrisaREF so it gets clear as water in the Caribbean. This way we can change the rent from the dialog, with Set VALAdhrisaREF.rent to 1 ...as it is the reference that are called and changed, not the script itself, so we can NEVER get something like this to work:Set VALAdhrisaSCR.rent to 1 Edited January 18, 2021 by Pellape Link to comment Share on other sites More sharing options...
Dimitrisgb Posted January 18, 2021 Author Share Posted January 18, 2021 (edited) Adhrisa is the name of the vendor and VAL comes from Valenwood. I will try what you told me and I will tell you as soon as possible. Edited January 19, 2021 by Dimitrisgb Link to comment Share on other sites More sharing options...
Dimitrisgb Posted January 19, 2021 Author Share Posted January 19, 2021 I still get the same message. I did all these things you wrote (first I tried by naming the script VALAdhrisa nd then VALAdhrisaSCR (d before h). So I went to the notepad archive and it says: "[CS] Script 'DefaultCompiler', line 3:Unknown referenced object 'VALAhdrisa'." Although there is NOWHERE any object called VALAhdrisa (h before d). Link to comment Share on other sites More sharing options...
Recommended Posts