forgetful hatter Posted September 12, 2015 Posted September 12, 2015 Hello loverslab.I've been messing with some skyrim mods learning skyrims way of scripting and I've been running into a frequent problem that has been melting my skull.I'll start with an example from a mod I like.... "Give Gifts to anyone in Skyrim"..... allows you to give 10 gold to people to raise their relationship rank by 1.Now i duplicated that script 3 times with each duplicate incrasing the relationship gain by 1.I've complied them inside the creation kit no problems there.I've opened the "Give Gifts to anyone in Skyrim".esp and found its quest that allows you to give gold to anyone made some dialoge options that offer greater gold for a greater relationship gain copy exactly how its done on the working example but it never seems to work. :/ The images goes as follows:code not working.png is the code i duplicated off a working example. code working.png is the working codeview.png is the auto generated way conversations go? i thinkworking.png the player dialog that works the player gives an npc 10 gold and they get a flower and + 1 to relationship rankwrong.png everything goes well but the script doesn't seem to run... :/ can anyone give me any advice or tips on what i am doing wrong?I basically want to make it where i can give npcs 100,200,300 or 400 gold to increase their relationship rank to me.just like in morrowind where I'd be giving everyone tons of gold simply because end game i really didn't need it.if only the creation kit would allow me to duplicate the original without having to make a new one and copy the same stuff over this would be so much easier.
Veladarius Posted September 12, 2015 Posted September 12, 2015 In Skyrim just adding scripts to dialogue does not do anything, the script needs entered into one of the fragment boxes which will then generate the script file. Here is how you can create the script and copy what you have to it: 1- put a ; in one of the script boxes and compile it, this will make the script file 2- open the source for the new script file in the window on the right 3- copy the properties from the original script into the source, put it at the bottom the same way it is in the original 4- compile the script, save and close it 5- copy the fragment part of the original script (lines 9 - 20) to one of the fragment boxes in the dialogue window and compile it. Since we already put the properties in it should work. 6- open the properties on the script and point them to whatever they need to go to 7- remove the old script
forgetful hatter Posted September 12, 2015 Author Posted September 12, 2015 In Skyrim just adding scripts to dialogue does not do anything, the script needs entered into one of the fragment boxes which will then generate the script file. Here is how you can create the script and copy what you have to it: 1- put a ; in one of the script boxes and compile it, this will make the script file 2- open the source for the new script file in the window on the right 3- copy the properties from the original script into the source, put it at the bottom the same way it is in the original 4- compile the script, save and close it 5- copy the fragment part of the original script (lines 9 - 20) to one of the fragment boxes in the dialogue window and compile it. Since we already put the properties in it should work. 6- open the properties on the script and point them to whatever they need to go to 7- remove the old script Sweet I'll give this a proper shot. thanks so much for the help
forgetful hatter Posted September 12, 2015 Author Posted September 12, 2015 sigh.....no still no luck at all.... it keeps returning saying things like variables already in use.I may have found another way of doing what i am looking to do if anyone knows what the symbol is that adds relative instead of setting the number.this is the basic code for the operation float givegold = gg.getvalue() int ggi = givegold as int game.getplayer().removeitem(gold, ggi) akspeaker.additem(gold, ggi) int flwr = Utility.RandomInt(0, 2) akspeaker.removeitem(flower[flwr], 1) game.getplayer().additem(flower[flwr], 1) game.getplayer().addspell(charity) game.advanceskill("Speechcraft", 25) if akspeaker.getrelationshiprank(Game.getPlayer()) < 1 akspeaker.setrelationshiprank(Game.getPlayer(), 1) endif the follow line:akspeaker.setrelationshiprank(Game.getPlayer(), 1)if i could get it to add relative or so something this would satisfy me and the original purpose Heres a c++ example as to what i kinda mean.. for(int i=0; i<5; i++) /// Column Totals //This loops on the rows. { }its a basic loop that'll run 5 times.....each time it restarts it adds 1 once it reachs 5 it'll stop. since each time the the code is run it sets the relationship rank to 1............i'd like to made it where it'd add 1 instead of set it.so that way i'd give the person gold 4 times to get the relationship rank to 4 and it would add 1 relationshiprank each time i give them gold.I just lack papyrus scripting skill at the moment. :/ don't know all the bits of code and symbols that can be used.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.