Jump to content

ozziefire

Members
  • Posts

    296
  • Joined

  • Last visited

Posts posted by ozziefire

  1. Jesus Christ....

     

    In CK create new magic effect of type script, and attach script (and set it's properties) to that effect. Use created magic effect to create the enchantment, attach that enchantment to your ring or some other object using OMOD, template or by any other way. Script will auto activate when item will be equipped. Your script:

    Thank you, after fixing a couple minor typos and reading PoliteRaiders post that compiled and now I have a better understanding how some of this Papyrus stuff works without resorting to invoking fictional deities :smile:.
  2. Ok looking through the CK I worked out that only 2 Armor items use scripts directly attached for whatever reason so changed direction to s script in a Magic Effect but still having similar issues :/

    Scriptname SuperEffects extends activemagiceffect
    
    Int Property NewProperty Auto Const
    
    Function SomeFunction()
    	RegisterForUpdate(1.0) ; Before we can use OnUpdate() we must register.
    EndFunction
    
    Event OnUpdate()
    
    	float fPowerLevel
    	actor akActor = SuperRing.GetActorRefOwner()
    	float fActorRads = akActor.GetValue ("Rads")
    	float fActorHealth = akActor.GetValue ("Health")
    	int iCurrRads = fActorRads
    	int iPrevRads
    	int iRadDamage = iPrevRads - iCurrRads
    
    	if (fActorRads <= 0)
    		if (fActorHealth < 100) ; Assuming 100% = 100)
    			fActorHealth = fActorHealth + 1
    			akActor.SetValue ("Health", fActorHealth)
    			DefaultScriptFunctions.DefaultScriptTrace(self + ":Healing")
    		endif
    	else
    		if (iRadDamage < 1)
    			fActorRads = fActorRads - 1
    			akActor.SetValue ("Rads", fActorRads)
    		endif
    	endif
    	iPrevRads = iCurrRads
    
    EndEvent

    Papyrus Compiler Version 2.8.0.4 for Fallout 4

    Copyright © ZeniMax Media. All rights reserved.

    Starting 1 compile threads for 1 files...

    Compiling "SuperEffects"...

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(6,1): RegisterForUpdate is not a function or does not exist

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(12,17): variable SuperRing is undefined

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(12,27): none is not a known user-defined script type

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(12,7): type mismatch while assigning to a actor (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(13,38): type mismatch on parameter 1 - cannot pass a string to a actorvalue

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(13,7): type mismatch while assigning to a float (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(14,40): type mismatch on parameter 1 - cannot pass a string to a actorvalue

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(14,7): type mismatch while assigning to a float (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(15,5): type mismatch while assigning to a int (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(22,21): type mismatch on parameter 1 - cannot pass a string to a actorvalue

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(23,26): argument showtrace is not specified and has no default value

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(28,21): type mismatch on parameter 1 - cannot pass a string to a actorvalue

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperEffects.psc(9,0): new event onupdate cannot be defined because the script is not flagged as native

    No output generated for SuperEffects, compilation failed.

     

    Batch compile of 1 files finished. 0 succeeded, 1 failed.

    Failed on SuperEffects

  3. Tried this too and failing because I realised OnLoad is also a one shot edge trigger by the looks

    Scriptname SuperPowerScript extends ObjectReference
    auto state MainBit
    	float fPowerLevel
    	actor akActor = SuperRing.GetActorRefOwner()
    	float fActorRads = akActor.GetValue ("Rads")
    	float fActorHealth = akActor.GetValue ("Health")
    	if (akActor.GetEquipped(SuperRing))
    		int iCurrRads = fActorRads
    		int iPrevRads
    		int iRadDamage = iPrevRads - iCurrRads
    	
    		if (fActorRads <= 0)
    			if (fActorHealth < 100) ; Assuming 100% = 100)
    				fActorHealth = fActorHealth + 1
    				akActor.SetValue ("Health", fActorHealth)
    				DefaultScriptFunctions.DefaultScriptTrace(self + ":Healing")
    			endif
    		else
    			if (iRadDamage < 1)
    				fActorRads = fActorRads - 1
    				akActor.SetValue ("Rads", fActorRads)
    			endif
    		endif
    		iPrevRads = iCurrRads
    	endif
    EndState

    Papyrus Compiler Version 2.8.0.4 for Fallout 4

    Copyright © ZeniMax Media. All rights reserved.

    Starting 1 compile threads for 1 files...

    Compiling "SuperPowerScript"...

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(3,7): missing FUNCTION at 'fPowerLevel'

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(3,18): mismatched input '\\r\\n' expecting LPAREN

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(0,0): error while attempting to read script SuperPowerScript: Object reference not set to an instance of an object.

    No output generated for SuperPowerScript, compilation failed.

     

    Batch compile of 1 files finished. 0 succeeded, 1 failed.

    Failed on SuperPowerScript

  4. Ok now I have this, SuperRing is the name of the object the script is attached to, its just a copy of the WeddingRing

    Scriptname SuperPowerScript extends ObjectReference
    
    Event OnLoad()
    	float fPowerLevel
    	actor akActor = SuperRing.GetActorRefOwner()
    	float fActorRads = akActor.GetValue ("Rads")
    	float fActorHealth = akActor.GetValue ("Health")
    	if (akActor.GetEquipped(SuperRing))
    		int iCurrRads = fActorRads
    		int iPrevRads
    		int iRadDamage = iPrevRads - iCurrRads
    	
    		if (fActorRads <= 0)
    			if (fActorHealth < 100) ; Assuming 100% = 100)
    				fActorHealth = fActorHealth + 1
    				akActor.SetValue ("Health", fActorHealth)
    				DefaultScriptFunctions.DefaultScriptTrace(self + ":Healing")
    			endif
    		else
    			if (iRadDamage < 1)
    				fActorRads = fActorRads - 1
    				akActor.SetValue ("Rads", fActorRads)
    			endif
    		endif
    		iPrevRads = iCurrRads
    	endif
    EndEvent

    Compiling "SuperPowerScript"...

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(5,17): variable SuperRing is undefined

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(5,27): none is not a known user-defined script type

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(5,7): type mismatch while assigning to a actor (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(6,38): type mismatch on parameter 1 - cannot pass a string to a actorvalue

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(6,7): type mismatch while assigning to a float (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(7,40): type mismatch on parameter 1 - cannot pass a string to a actorvalue

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(7,7): type mismatch while assigning to a float (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(8,25): variable SuperRing is undefined

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(8,13): GetEquipped is not a function or does not exist

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(9,6): type mismatch while assigning to a int (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(16,22): type mismatch on parameter 1 - cannot pass a string to a actorvalue

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(17,27): argument showtrace is not specified and has no default value

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(22,22): type mismatch on parameter 1 - cannot pass a string to a actorvalue

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(8,1): cannot cast a void to a bool to perform a condition check

    No output generated for SuperPowerScript, compilation failed.

     

    Batch compile of 1 files finished. 0 succeeded, 1 failed.

    Failed on SuperPowerScript

  5. I know this doesn't necessarily help as Papyrus advice, but if the important part is getting the ring to do what you want then I think you could get the same result with a Magic Effect placed on the ring using the conditions tab in the Creation Kit to change how it functions when the player character isn't irradiated. However if you're doing this to practice Papyrus scripting then I get why you'd want to do it this way though.

     

    I'm a total novice at scripting so take my advice with a pinch of salt but here's some suggestions.

     

    1. According to the payprus information on the OnEquipped event "When an object is equipped it is inside a container, which means that you cannot call native functions on it. (Unless it is a persistent reference)"

     

    2. Shouldn't it be akActor.getvalue rather than akActor.getactorvalue.

     

    3. GetActorOwner is used for getting the base owner, i.e. it's owned by a person belonging to the gunner template rather than this particular individual gunner. You should be using GetActorRefOwner.

     

    4. You're just pulling GetActorOwner out of thin air, it needs to be TheObjectYou'reReferringTo.GetActorOwner. Otherwise the compiler will be wondering "owner of what?".

     

    I'm not sure that's everything, but there's some problems I can spot.

    Cool, thanks for the advice, yes its a learning experience I have much grander plans later of course and other mods planned, so I thought I'd start with something simple and build on it when it works rather than drop 200 lines of "Why won't this work?" on others :smile:

    I'll poke around with it more tomorrow and do some more wiki reading on the functions and see if I can get it compiled and firing.

  6. Ok did that and now get this:

    Papyrus Compiler Version 2.8.0.4 for Fallout 4

    Copyright © ZeniMax Media. All rights reserved.

    Starting 1 compile threads for 1 files...

    Compiling "SuperPowerScript"...

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(5,0): new event onequip cannot be defined because the script is not flagged as native

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(12, :cool:: type mismatch while assigning to a actor (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(13,29): GetActorValue is not a function or does not exist

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(13, :cool:: type mismatch while assigning to a float (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(14,31): GetActorValue is not a function or does not exist

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(14, :cool:: type mismatch while assigning to a float (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(15,6): type mismatch while assigning to a int (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(17,2): variable iRadDamage is undefined

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(17,2): type mismatch while assigning to a none (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(22,22): type mismatch on parameter 1 - cannot pass a string to a actorvalue

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(23,27): argument showtrace is not specified and has no default value

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(26,7): variable iRadDamage is undefined

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(26,18): cannot compare a none to a int (cast missing or types unrelated)

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(26,18): cannot relatively compare variables to None

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(28,22): type mismatch on parameter 1 - cannot pass a string to a actorvalue

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(35,0): new event onunequip cannot be defined because the script is not flagged as native

    No output generated for SuperPowerScript, compilation failed.

     

    Batch compile of 1 files finished. 0 succeeded, 1 failed.

    Failed on SuperPowerScript

    Any idea what the 2nd, 3rd, 4th etc things I ned to do now? :smile:
  7. Its a joke they even bother having a contest when the CK isn't even out of beta. The CK only became stable for many in last weeks update and is lacking basic features GECK had like editing ESMs and saving files with multiple master esps.

     

    Our best mods IMO are FO4Edit and F4SE, why aren't they nominated? Probably too embarrassing for Beth.............

     

    Due to some Beth Launcher server screwup for over a month most Australian modders and many other Overseas can't even download the beta CK without using a VPN or doing a "click that quickly while standing on your head" method. Beth have been "working on it" for 3 weeks.............

  8. I've done a fair bit of scripting ok in GECK but never done Papyrus before so this is my first script attempt:

     

    I've basically made a copy of the Wedding ring, I have the following script attached to it, the idea being that the wearer slowly regenerates health if they have no Rads, and that they will also regenerate rads slowly too.

     

    But I'm having some really basic problems with the structure and some basic problems, I can't get it to compile.

    I'm under the impression OnEquip and OnUnequip are one shot edge triggers, but I could be wrong. So I'm trying to set a bool then use that to check if the Main part should be running.

     

    Scriptname SuperPowerScript extends ObjectReference native
    
    bool bItemWorn ; it doesn't seem to like this, how am I to tell my main part to keep running or am I wrong in assuming OnEquip is an edge trigger?
    
    Event OnEquip()
    		bItemWorn = 1
    EndEvent
    
    Function MainPart ()
    		if (bItemWorn)
    		float fPowerLevel
    		actor akActor = GetActorOwner() ; I'm trying to set the wearing actor here, I'm doing it wrong
    		float fActorRads = akActor.GetActorValue ("Rads")
    		float fActorHealth = akActor.GetActorValue ("Health")
    		int iCurrRads = fActorRads
    		int iPrevRads
    		iRadDamage = iPrevRads - iCurrRads
    	
    		if (fActorRads <= 0)
    			if (fActorHealth < 100) ; Assuming 100% = 100)
    				fActorHealth = fActorHealth + 1
    				akActor.SetValue ("Health", fActorHealth)
    				DefaultScriptFunctions.DefaultScriptTrace(self + ":Healing")
    			endif
    		else
    			if (iRadDamage < 1)
    				fActorRads = fActorRads - 1
    				akActor.SetValue ("Rads", fActorRads)
    			endif
    		endif
    		iPrevRads = iCurrRads
    	endif
    EndFunction
    
    Event OnUnequip()
    		bItemWorn = 0
    EndEvent
    Compiler Output:

    Papyrus Compiler Version 2.8.0.4 for Fallout 4

    Copyright © ZeniMax Media. All rights reserved.

    Starting 1 compile threads for 1 files...

    Compiling "SuperPowerScript"...

    C:\Users\Owner\AppData\Local\Temp\PapyrusTemp\SuperPowerScript.psc(3,1): native scripts may not contain data, script variable bItemWorn cannot be defined

    No output generated for SuperPowerScript, compilation failed.

     

    Batch compile of 1 files finished. 0 succeeded, 1 failed.

    Failed on SuperPowerScript

    I tries removing native and it says it has to be native, I tried const and get similar issues.

    I'm a little confused on whether the main should be a function and if it how to call it every 10 seconds RealTime or 30seconds Gametime

  9. Unfortunately whatever that link is its not there anymore, that's just the landing page, I'm looking for the CK equivalent of this GECK page

    http://geck.bethsoft.com/index.php?title=Category:Functions

    Just a nice simple easy to read list of functions with links to more detail :tongue:

    I found this but there's no logical order to the way the functions are listed, Alphabetically would be nice and more functions per page

    http://mod.gib.me/skyrim/functions.html

  10. Mod users outnumbered actual Modders by a huge percentage, of course Mod Users get what they stomp about, they want everything for free, and they get what they pay for with heaps of chaff mods clogging databases.

    The whole thing was like people wanting all online stores shutdown because they don't want people to be able to sell stuff they've made :P

  11. Looks great, better than nothing at this point, sorry I can't help with modelling (I'm 70% blind).

    But I too like armor to be armor, skin can be exposed in the frame but the plating should cover everything for radiation resistance and/or waterproofing.

  12.  

    Is there a list of extra script commands somewhere?

    The only one is a console command GetF4SEversion :smile:

     

    So I have to have the game running while I write scripts or write them all down manually with one of those pen thingys :smile:
  13. It means that the record is in old format (check Form Version field at the top) and this field is not used and filled with garbage.

    The latest available build of FO4Edit zeroes such fields automatically, but already created plugins with such numbers must be fixed manually.

    Ah good stuff, and here I've been adding 768 to additions to lists if the other items had 768 :smile:
  14. Yeah, the male refrigerator suit is too bulky mainly because some clown designed it for wearing combat armor and even a frigging helmet underneath, that's going to chaffe something bad.

     

    I'd love some Bubble Gum Crysis style Power armor designed for only a skinsuit with a chassis and added removable plates. The one Chassis could then be used for a multitude of plating designs for real individuality.

     

    We probably will lose the enter/exit animations unless someone is really keen, but that's no big deal someone might make them later.

     

    Has anyone tried shrinking/reshaping the Vanilla Power Armor and plating with CBBE bodyslide somehow?

  15. Aside from the fact that it is against the TOS and copyright law, there are also no horses in the Fallout Universe. They went extinct after the Great War. If you want something like that, you'd be better off trying to make a Radstag mount or something similar - but horses won't work. :tongue:

     

    Just sayin'.

    Lore Smore.....

    Many mods aren't Lore friendly that's no reason not to make them if people want them, if you don't want them don't install them.

     

    We could always pull the horses from Skyrim TTW style to get around the Beth assets legal smeazels.

     

    And someone imported a Godzilla to FO4, how hard can it be for an experienced modeller to get a 3D horse model and do the same? The riding animations probably the hard bit.

  16. "KernalsEgg found that by pressing install Immediately after saving settings in the options for the beth.net launcher, he was actually able to get the install to start about 50% of the time.

     

    I tried it out and managed to get the same results, with the EULA appearing and then the install path after that. The key was to accept through it as quickly as possible. Seems the connection back to bethesda's servers is stronger for a few seconds after you have saved your settings.

     

    Again the process I went through was as follows:

     

    Hit bethesda net logo in top left hand corner and go to settings -> save settings (don't change anything unless you want to doesn't make a difference) -> as quickly as possible hit the install button on the creation kit ->

     

    if the EULA comes up tick the acknowledgement and accept as quickly as possible (assuming you have read the EULA previously like we all do...) -> If the install directory location option comes up click accept as quickly as possible -> if either the EULA or the install directory did not pop up repeat this process until it does!"

     

    It took me 20-30 goes but eventually it worked, getting stuck on loading dependencies at 0%. The CK works but seems to crash on exit though.

  17.  

    Mods that have AE as a Master will now crash peoples games.

    Any modder the AE patches should hide them too in protest against this author and projection from the influx of bug reports.

    Mods that use it as master will not crash unless you physically delete it off your PC. Stop crying when we're trying to get beth do realize something.

     

    Ok just tell me how a mod that has AE extended as a master will function for people who don't have Armorsmith Extended?

    He has a complete disrespect for other peoples work that relies on his.

    I can't download the GECK beta either but I would never screw other modders up by pulling a critical framework file. Beth don't care enough about modders to even release the GECK from beta..

×
×
  • Create New...