UniversalBlue Posted May 20, 2017 Posted May 20, 2017 Ah, OK. You need to open the CK and create a quest. Attach your script to the quest in the CK. If it compiles you'll see the properties in the script dialogue and you can point the property at your race record from there. After that it ought to work. I'm going to have to find a decent tutorial. I just can't work with what they've done to how scripts work. I've been trying to get this to work from this tutorial and can't, https://www.creationkit.com/fallout4/index.php?title=Bethesda_Tutorial_Papyrus_Hello_World Its literally giving me a migraine. I should be able to just punch in the script I want. Total bullshit.
Halstrom Posted May 20, 2017 Posted May 20, 2017 Ah, OK. You need to open the CK and create a quest. Attach your script to the quest in the CK. If it compiles you'll see the properties in the script dialogue and you can point the property at your race record from there. After that it ought to work. I'm going to have to find a decent tutorial. I just can't work with what they've done to how scripts work. I've been trying to get this to work from this tutorial and can't, https://www.creationkit.com/fallout4/index.php?title=Bethesda_Tutorial_Papyrus_Hello_World Its literally giving me a migraine. I should be able to just punch in the script I want. Total bullshit. Yeah probably try YouTube search for script creation. You have to create properties for scripts, Properties are a sort of list of external variables or items that the script needs to access. Theres a thing in script creation called name or domain or something, it is basically the folder inside the scripts folder you want it created in, you should use it with your mods name. When creating a new script just put any int in there at first and then you can add more properties in the script itself when you open it and delete the line with the random int. Then after creating new properties , compile and save, then edit the properties linking them to the actual variables or items or effects etc they need. Const basically means read only, your script can't change it.
Vader666 Posted May 20, 2017 Posted May 20, 2017 ...But at this point there are now so many dirty mods floating all over the place, that compatibility is going to be nearly impossible to achieve... This leads me to the question, are duplicates of forms hardsaved into the esp, which is what i think, or do they get created during load ? When they get hardsaved in the esp all you need to do is duplicating the form you need access to and no one could mess with that. Otherwise it would be a question of load order. So i´m not getting where the problem is. ...But in order to have a truly custom race, we need new HumanSubgraphData and PowerArmorData records, and let me tell you its not fun adding line after line of behaviour files... You can set the Subgraph to use a template ( the HumanSubgraphData ) and you´re done. Unless you want to use custom animations for everything but in that case the SubgraphData is the smallest amount of work.
Trykz Posted May 20, 2017 Posted May 20, 2017 ...But at this point there are now so many dirty mods floating all over the place, that compatibility is going to be nearly impossible to achieve... This leads me to the question, are duplicates of forms hardsaved into the esp, which is what i think, or do they get created during load ? When they get hardsaved in the esp all you need to do is duplicating the form you need access to and no one could mess with that. Otherwise it would be a question of load order. So i´m not getting where the problem is. Yes. Duplicate forms get saved to the .esp. But it's still a question of load order. The last version of a duplicate form to be loaded wins. Period. And that's the problem. When multiple mods edit the same form, they instantly become incompatible with each other, because the last loaded plugin wins control of the edited form. Which is why my races handle the race swap via terminal fragment at runtime. Using this method leaves the form they need access to (in this case, HeadPartsHuman) intact and unedited, and the races are added to that formlist dynamically when the terminal fires the script, giving the currently played race priority over the form regardless of it's load order position. Trykz
UniversalBlue Posted May 20, 2017 Posted May 20, 2017 Well came back to it. Tutorials got me as far as making the crudest of crude scripts running.. Scriptname PonnerScriptV2 extends Quest {Attaches to a start game enabled quest.} Event OnQuestInit() Debug.MessageBox("Hello World!") EndEvent Tested, it does a "Hello World" line just like its supposed to.. now, again, the original line posted about Custom Races.. race property my_race auto; ...four_play:Main.register_race(my_race) I just can't seem to get this. It won't compile. I placed this code sandwiched below the "hello world" line just to be paranoid about where I placed it.. in fact I tried one more variation... Scriptname PonnerScriptV2 extends Quest {Attaches to a start game enabled quest.} race property my_race auto Event OnQuestInit() Debug.MessageBox("Hello World!") four_play:Main.register_race(my_race) EndEvent Errors are as follows: (9,0): variable four_play:Main is undefined (9,15): none is not a known user-defined script type The race I am using is listed in CK as aaaPonyRace (I am unsure where this piece of information goes except for maybe as a Property added to the above script in a separate window. At first I thought "my_race" was meant to be replaced by aaaPonyRace but replacing it or leaving it alone make no difference. My .esp is using the race mod, four_play.esp, and four_play_resources.esm as dependents. If anyone made their own custom race patch .esp, would you please show me the script you added or give me a copy to look through? At this point its becoming less about me trying to make this mod work and more about trying to make myself feel confident again about working with F4.
DocClox Posted May 20, 2017 Author Posted May 20, 2017 you'll need to have four_play.esp loaded in the ck. make sure your mod is the active one though
vinfamy Posted May 20, 2017 Posted May 20, 2017 you'll need to have four_play.esp loaded in the ck. make sure your mod is the active one though I always use GetFormFromFile to get your Quest and then CastAs to fetch your Main script without making Four-Play a masterfile, but that's just me and my attitude of avoiding hard dependencies if possible lol.
VonHelton Posted May 20, 2017 Posted May 20, 2017 Something that's been bothering me for a while: I tried to create a new race for testing purposes. SO I duplicated the human race, then I took a couple of raiders, duplicated them, and changed their race to use the duplicate race I'd used. And instantly, they new raiders have no bodies - just heads floating there. It's somewhat academic by this point but, does anyone know here I went wrong? I'd be nice to understand this. They're a new race, so it stands to reason they'd need a skeleton......Pretty sure Skyrim needed skeletons for it's races too. :lol: :lol:
Expired6978 Posted May 20, 2017 Posted May 20, 2017 you'll need to have four_play.esp loaded in the ck. make sure your mod is the active one though I always use GetFormFromFile to get your Quest and then CastAs to fetch your Main script without making Four-Play a masterfile, but that's just me and my attitude of avoiding hard dependencies if possible lol. Which is the correct way. Directly depending on scripts breaks when that script doesn't exist in the first place. They added all this functionality for indirectly accessing scripts for a reason.
Claysson2 Posted May 21, 2017 Posted May 21, 2017 you'll need to have four_play.esp loaded in the ck. make sure your mod is the active one though I always use GetFormFromFile to get your Quest and then CastAs to fetch your Main script without making Four-Play a masterfile, but that's just me and my attitude of avoiding hard dependencies if possible lol. Which is the correct way. Directly depending on scripts breaks when that script doesn't exist in the first place. They added all this functionality for indirectly accessing scripts for a reason. Having Four-Play as a Master seems like a no brainer. So.. having Sex would be the quest and the custom race would be my body with an erect penis, or a woman's with a strap on. might work, at least me and every Tom, Dick and Raider wouldn't have a hard on all the time. Might solve the PA issue too? Still... every time I Bang Cait, Piper pushes her all over the place.
DocClox Posted May 22, 2017 Author Posted May 22, 2017 four_play:Main does have a global GetAPI() function which does exactly this: it loads the main quest from file using the formid.I went for that approach following the example of SexLab. As someone explained it to me, if the mod isn't included the function isn't found and you get a None value for your API. Test against None, abort any 4P scenes if you don't have a ref and you should be bulletproof.Of coruse, you still have a dependency in that if you do want to use the scripts you need to know about the functions exposed by the framework. The alternative there is to use the mod commincation functions new in Fo4 - but that's slow and not recommended for general use. And if you're writing for 4P you're going to need it loaded to work anyway.
VonHelton Posted May 22, 2017 Posted May 22, 2017 four_play:Main does have a global GetAPI() function which does exactly this: it loads the main quest from file using the formid. I went for that approach following the example of SexLab. As someone explained it to me, if the mod isn't included the function isn't found and you get a None value for your API. Test against None, abort any 4P scenes if you don't have a ref and you should be bulletproof. Of coruse, you still have a dependency in that if you do want to use the scripts you need to know about the functions exposed by the framework. The alternative there is to use the mod commincation functions new in Fo4 - but that's slow and not recommended for general use. And if you're writing for 4P you're going to need it loaded to work anyway. Speaking of 4 Play, what's the status of the player can opener? The NPC can opener works great, but the player's is kinda off yet. I've managed to quickly jump out of my PA during the dialog (very tricky to do).
pone4 Posted May 22, 2017 Posted May 22, 2017 You can add custom races (i.e. the CAN ones) through the console as well using AddFormToFormlist, just have to search for the allowed races formlist and the id of your race.
DocClox Posted May 22, 2017 Author Posted May 22, 2017 Speaking of 4 Play, what's the status of the player can opener? The NPC can opener works great, but the player's is kinda off yet. I've managed to quickly jump out of my PA during the dialog (very tricky to do). I'll be honest - I've had very little time to work in 4P at all over the last few weeks. No sign of it easing off for a while yet, either
kianpepper Posted May 23, 2017 Posted May 23, 2017 Alpha Software - this mod may destroy your machine *Backs away slowly.* Never seen a mod say that before. Pass.
vinfamy Posted May 23, 2017 Posted May 23, 2017 *Backs away slowly.* Never seen a mod say that before. Pass. It's sarcasm, dude ...
C5Kev Posted May 23, 2017 Posted May 23, 2017 *Backs away slowly.* Never seen a mod say that before. Pass. It's sarcasm, dude ... Wow, you need to explain that? LOL!
Claysson2 Posted May 23, 2017 Posted May 23, 2017 Alpha Software - this mod may destroy your machine *Backs away slowly.* Never seen a mod say that before. Pass. Definitly the end of the Commonwealth as we know it. In real life Adam ate the Apple, in Fallout he ate the Cherry.
Mortality6 Posted May 23, 2017 Posted May 23, 2017 I've searched, but I couldn't find an answer, is there a way to make the animations last longer than 30 seconds?
DocClox Posted May 23, 2017 Author Posted May 23, 2017 Alpha Software - this mod may destroy your machine *Backs away slowly.* Never seen a mod say that before. Pass. If it helps any, there have been no reports so far of any machine destroying bugs. Or machine destroying features, come to think of it. Seriously, the worst this is likely to do is trap your character in a naughty animation loop requiring you to load an earlier save - although that doesn't seem have happened yet either. (That said, I guess I'm far enough past 0.0.0.1 that I can probably downgrade the warning level a little ) I've searched, but I couldn't find an answer, is there a way to make the animations last longer than 30 seconds? There is a default_duration field that should override the default 30 seconds. And I seem to recall putting a menu to change it in the test cell exit terminal. The menu display is glitched but the value setting should work. Or it should be settable from the console, although I can't tell you how until I get back home,
Mortality6 Posted May 23, 2017 Posted May 23, 2017 Ah I see, I've tried using the terminal from coc 4test area, but it doesn't change the duration. It's still 30 seconds. Also, awesome mod man!
DocClox Posted May 23, 2017 Author Posted May 23, 2017 Ah I see, I've tried using the terminal from coc 4test area, but it doesn't change the duration. It's still 30 seconds. Also, awesome mod man! Yeah, I wasn't sure how well it was working. I had it set to 5 seconds for testing and that seemed ok. try this: set dox_4P_default_duration to 60 Or whatever you want instead of 60.
Midwinter1888 Posted May 23, 2017 Posted May 23, 2017 "Survival Options, v1.62. This mod has an inventory item that saves the game in Survival Mode. It seems to conflict with the mod for some reason." What sort of conflict are we talking about here? Minor glitches or game breaking? I don't know if I can live (in Fallout 4) without the Survival Options mod, and I really want to test run Four Play. Either way, thanks very much, DocClox, for what must have been an eye-watering amount of work on this mod.
Xper000 Posted May 24, 2017 Posted May 24, 2017 @ Midwinter1888 I was the one who reported that. In an earlier version of four-play, stripping would break everytime I used the hard save or quicksave inventory items supplied by the survival options mod. Eveything else the mod offered worked fine once I found another method to save. There may be no problem at all now in the newer versions of four play.
VonHelton Posted May 24, 2017 Posted May 24, 2017 In fairness, 4 Play hasn't caused planets to explode or Russians to force me to vote for Trump, but I did stay at a Holiday Inn once! :lol: :lol:
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now