Jump to content

lubronbrons

Premium Member
  • Posts

    567
  • Joined

  • Last visited

Posts posted by lubronbrons

  1. maybe this will help

    read and learn here bro >>> cs wiki SetModePath

    you must learn this too >>> Update3D

    I never use that syntax, so I can't help much

    but this is just a guess, you can use that syntax like this (not confirmed)

    SetModelPath "meshes\XXXyourFlamingModel.nif" XXXyourFlamingSword
    youCurrentEquipFlameRef.Update3D
  2. yeah ! that's crucial for programmer ! lol

     

    the documentation of OBSE you should see it yourself in your Oblivion install directory in file ' obse_command_doc.html ' or you can read here for more info notation & expressions

     

    here's a little example for you. the message will appear in Console in-game (see it by pressing tilde '~' then write command tdt and press enter)

    scn TestPrint
    ref rf1
    short sh1
    string_var st1
    begin GameMode
    	
    	Let rf1 := MartinRef
    	Let sh1 := 1
    	Let st1 := "My name is"
    	
    	PrintToConsole "Hello World!"
    	PrintToConsole "value of var sh1 is %g" sh1
    	PrintToConsole "value of var st1 is %z" st1
    	PrintToConsole "rf1 have name %n and FID %i" rf1 rf1
    	PrintToConsole "Valiables can be print out like this : %z %n. %p knows sh1 is %g" st1 rf1 rf1 sh1
    end

    but when in game you must have quest or something like that

    because quest can store variable that can be called anywhere

    example

    you have Quest 'TestPrint' and attached 'TestPrintQuestScript'

    then in that script you have variable 'short myValueA' and 'short myValueB'

    when in-game

    you can assign in like this

    set TestPrint.myValueA to 999 ;---> notice that when calling from script you don't write its script name (that attached to the quest), but the Quest name instead
    

    or you can do something like this

    set TestPrint.myValueA to TestPrint.myValueA > TestPrint.myValueB
    

    sadly Object script variable can't be accessed directly

    but if you insist to know variable in Object script, you can ! by using a little trick

    how?

    you should make a variable that update Quest variable of the same type in that object script

    then ... when you call that quest variable, it will be the same as the Object script one

    this method is not very elegant

  3. hey anto :smile: please don't discourage & insult yourself like that

     

    eval is good for many OBSE script, not only in handling integer float or prevent zero divide. it is usually used in OBSE array function see here

     

    I wonder if the code working fine so I tried running simulation in my head

     

    and I think there will still be a problem, if that newly created non-flaming sword have enchant ? it will be problem right? >>> Make sure that non-flaming have charge some too like you flaming one

     

    so here's the code for Flaming version ONLY, you'll notice the how's the different in adding item there. The newly created non-flaming sword is forced to have 0 charge in creation

    scn FlamingSwordChargedScript ;the flaming one
    
    ref owner
    ref ench
    float chargeCost
    short switchWeapon
    
    ref temp
    
    Begin OnEquip
    	Let ench := GetEnchantment
    	Let chargeCost := GetEnchantmentCost ench
    	Let owner := GetContainer
    End
    
    Begin GameMode
    	If IsEquipped == 0
    		Return
    	ElseIf owner.IsRidingHorse
    		Return
    	ElseIf switchWeapon
    		Let switchWeapon := 0
    		RemoveMe
    	ElseIf eval(GetCurrentCharge / chargeCost) < 1 ;if 0 USES, Switch to non-flame
    		;generate non-flame sword that HAVE 0 USES. exactly 0 uses
    		Let temp := CreateTempRef provanofiamma
    		temp.SetRefCount 1
    		SetEnchantmentCharge 0 temp ;make this newly created non-flame sword have 0 uses
    		temp.CopyIR owner ; add to current host
    		owner.EquipItem2 provanofiamma
    		Let switchWeapon := 1
    	EndIf
    End
    
  4. don't mind, me too speak & write funny English (coz I'm not native)

     

    I believe put eval there is no harm, so you will not get error compile or something like that

    I've had experience on this too... in my case : while trying detect valued item, sometimes can return 0 that makes my script break

    better safe than sorry, but don't know for sure. My teacher should have better opinion on this

     

    after look it more and more you use this line incorrectly ' if (charge / chargeCost) >= 1 '

    that var charge is only assigned at first !? that's why forli use ' GetCurrentCharge ', stick with it :smile:

    I revised it once more, this should be good to go

    Flaming one (have Uses > 1)

     

     

    scn FlamingSwordChargedScript ;the flaming one
    
    ref owner
    ref ench
    float chargeCost
    short switchWeapon
    
    Begin OnEquip
    	Let ench := GetEnchantment
    	Let chargeCost := GetEnchantmentCost ench
    	Let owner := GetContainer
    End
    
    Begin GameMode
    	If IsEquipped == 0
    		Return
    	ElseIf owner.IsRidingHorse
    		Return
    	ElseIf switchWeapon
    		Let switchWeapon := 0
    		RemoveMe
    	ElseIf eval(GetCurrentCharge / chargeCost) < 1 ;if 0 USES, Switch to non-flame
    		owner.AddItemNS provanofiamma  1
    		owner.EquipItem2 provanofiamma
    		Let switchWeapon := 1
    	EndIf
    End 

     

     

    Non-Flaming (zero enchant uses)

     

     

    scn FlamingSwordDischargedScript ;non-flame sword
    
    ref owner
    ref ench
    float chargeCost
    short switchWeapon
    
    Begin OnEquip
    	Let ench := GetEnchantment
    	Let chargeCost := GetEnchantmentCost ench
    	Let owner := GetContainer
    End
    
    Begin GameMode
    	If IsEquipped == 0
    		Return
    	ElseIf owner.IsRidingHorse
    		Return
    	ElseIf switchWeapon
    		Let switchWeapon := 0
    		RemoveMe
    	ElseIf eval(GetCurrentCharge / chargeCost) > 0 ;USES available! Flaming on!
    		owner.AddItemNS provafiammakatana1  1
    		owner.EquipItem2 provafiammakatana1
    		Let switchWeapon := 1
    	EndIf
    End  

     

     

     

    btw

    this is no java, this is no c

    this is OBSE scripting buddy :smile:

    and the programming logic is 'Universal' applied to all of them java, c, OBSE, etc

    which is Master Forli is very excel at that, he can make many very streamlined code in one go

  5. I tried to recheck the codes, it will gonna be a bad loop it seems

    scn FlamingSwordChargedScript
    ...
    	ElseIf switchtime != 2
    		if (enchh / chargeCost) <= 1 ;this gonna be trouble
    			let switchTime := 1
    		endif
    ...
    
    scn FlamingSwordDischargedScript
    ...
    		if (charge / chargeCost) >= 1 ;this gonna be trouble
    			let switchtime := 1
    		endif
    ... 

    so you should use the conditional like this.

    by change both of ' >= 1 ' & ' <=1 ' . they both can be true right? at value 1??

    this is the revision

    scn FlamingSwordChargedScript
    ...
    	ElseIf switchtime != 2
    		if eval(enchh / chargeCost) < 1 ;added eval for safe code, fix the comparation
    			let switchTime := 1
    		endif
    ...
    
    scn FlamingSwordDischargedScript
    ...
    		if eval(charge / chargeCost) > 0 ;added eval for safe code, fix the comparation
    			let switchtime := 1
    		endif
    ...
  6. about your problem ...

    that's probably because zero divide

    in math we all know that 0 (zero) is baddie

    something like ' 0 / 3 ' or ' 5 / 0 ' will produce not desirable result (if you using MS excel it will say NA = Not Available)

    so .... for this fix, notice that in my script I wrote it like this

    Let curUses := curCharge / (enchCost + 0.001)
    

    see that ' 0.001 ' ? that trick will make the system avoid zero divide error

    OR you can do something like this

    Let curUses := eval(curCharge / enchCost)
  7. ahh yeah this is my personal experience....

    the bad side of Object Script, is if you have that item more than one. the script will run more than one

    and sometimes cause missbehave....

    so, if you using Master Forli's script . Make sure you only have one sword each,

    I don't know for sure. but for sure I did have bad experience with Object script

  8. Hi

     

    first, create new Quest from Menu -> Character >> Quest >> rightclick in left table >> choose 'New'

    name the quest as you like. then attach this script below

    long ago my teacher give me script about enchantment, now I'm gonna share it

    I didn't test the code, hope it works

    scn provaQuestScript
    
    ref weap
    float fQuestDelayTime
    float curCharge
    float enchCost
    short curUses
    
    short rmvFlameSwd
    short rmvNonFlame
    
    begin GameMode
    	Let fQuestDelayTime := 1 ;make the script run check every 1 second
    	if rmvFlameSwd
    		Player.RemoveItemNS provafiammakatana1 1
    		Let rmvFlameSwd := 0
    	elseif rmvNonFlame
    		Player.RemoveItemNS provanofiamma 1
    		Let rmvNonFlame := 0
    	endif
    
    	;check if player currently equip Flame blade
    	if Player.GetEquippedObject 16 == provafiammakatana1
    		Let curCharge := Player.GetEquippedCurrentCharge 16 ;the equipped weapon current charge
    		Let enchCost := GetEnchantmentCost ench ;the cost of the enchantment
    		Let curUses := curCharge / (enchCost + 0.001) ;current charge / charge per use = remaining uses
    		if curUses <= 0
    			Player.AddItemNS provanofiamma 1
    			Player.EquipItemNS provanofiamma
    			Let rmvFlameSwd := 1
    		endif
    	elseif Player.GetEquippedObject 16 == provanofiamma
    		;current player sword is the non-flame one
    		Let curCharge := Player.GetEquippedCurrentCharge 16
    		Let enchCost := GetEnchantmentCost ench
    		Let curUses := curCharge / (enchCost + 0.001)
    		if curUses > 0 ;------------------------------------------------------->change this value as you see fit
    			Player.AddItemNS provafiammakatana1 1
    			Player.EquipItemNS provafiammakatana1
    			Let rmvNonFlame := 1
    		endif
    	endif
    end
    
  9. Try Amulet of Greed then, it's in my signature.

    in that mod, contain ' Respawn ' feature called Greed Eternal

    if you don't like certain features you can turn it off easily

    it's very modular, I hope you like it

  10. Hello, I am currently stuck in developing my own mods project and I am bored to death .... (you can see in my signature what my mod are)

    so .... in meantime while read some of new post, I found this request

    I think I can do it

    here's simple instant kill mod I've just made it for you >> link download MediaFire

    place that in Oblivion data folder and play, by default is set to 25 % chance,

    you can setting it to suit your taste with the file 'InstantKill.ini' , range 0 - 100

    note :

    - instant kill feature only applied to player only

    - super very lightweight mod, it will not affect game performance at all

    - you can change percentage instant kill chance in file ' InstantKill.ini '

    - esp load order does not matter, will not conflict with any mod (probably) because ONLY affect player hit attack

    - if you set the % chance to 100, the target will always die in a single hit

    - you said weapon so I only make this only works for weapon hit only, no magic. no hand to hand

  11. hello ZZ

    recently I am working at mod that use many voice file >> http://www.nexusmods.com/oblivion/mods/46719/?

    and for your request.... to do this is hard task for sure

    so far to create mp3 itself is easy, you can use Audacity 1.3.12 better use this version

    also you must download mp3 dll LAME from its official website.

    when you create a mp3 file for Oblivion set this setting in Audacity -> 44100 Hz, 64 kbps cbr (constant bit rate), Channels: mono

     

    and for esp, to register records that you want...

    so far I just can add it manually using TES4 edit

    how can I do that? you should see this file >> http://www.megafileupload.com/b1Ww/PCSound_Set_conversion_(Dialog).xlsx

    in that file excel you can see how to process a dialog that you want,

    luckily when I develop it I used English language for its notes, so you can learn from that

    hope anybody need that file too...

    its super confusing at first but if you get a grasp of it, you will be golden

  12. lately I have given up gaudy lush mod & Qarl texture replacer mod, also all texture related ... until I find this new simple mod >> Oblivion halfsized

     

    it works superb for me, in exchange for reduced beautification so this option is not for everybody for sure.

    with a very sad heart I let go Lush Gaudy mod for all the greenies & Qarl for more detailed texture..... :pinch:

     

    usually I start at RAM 290 - 340 mb (depend on area),

    but using that Oblivion halfsize now it is about 170 - 230 mb. To see RAM usage use command tdt then command SetDebugText 13 in console mode

     

    I wonder if quarter size will free up some more RAM for me... but still no user that upload it (complete texture pack) like that Oblivion halfsized

     

    longer gameplay, longer fun. yeah you know, in exchange reduced texture quality. I can tolerate that anyway

  13. because there is always members that put effort to write in modder comments tab, in many new or old mods

     

    we modders feel happy just being acknowledged like that, a presence that being accepted or criticized then improving or maybe others feeling

     

    I think that's what keep modders willpower alive, far from retired. that we can still deliver some creation, more updates ... give other peoples hope, something worth be awaited

     

    without some incentive or bribery... its just about sharing passion,

     

    Oblivion nexus community formed like this in very long history

  14. EDIT : SOLVED, now I can rename all Dialog script no matter how much it is :laugh:

     

    I believe this need to be answered by TES 4 Edit script experts,

     

    I want to ask
    how to add new dialog (signature DIAL) with one or two childs (signature INFO) + Emotion Type + NAM1 Response Text
    linked with quest PCSoundAlgernon [QUST:01001770]
    please help, I need to do this because its impossible for me if I add it one by one using Tes4 edit UI .... the records that I gonna process is 1600+
    so its gonna be annoying hard task if I do it with right click - Add Dial, right click Add INFO, etc within 1600 repetition one by one
    thx b4
  15. Hello nick :smile:

    you can try AoG (Amulet of Greed) in my signature in below.

    in that mod

    there's Greed Watcher for guards follow sneak,

    and Greed Law, for crime overhaul

    please take time to read the description first, it's very customizeable

    hope you like it


  16. scn FenrirSummonScript

    short bHasPorted
    float fAngle

    Begin ScriptEffectStart
    set bHasPorted to 0
    End

    Begin ScriptEffectUpdate
    if (bHasPorted == 0)
    Set bHasPorted to 1
    FenrirRef.SetIgnoreFriendlyHits 1
    if WolfFollow && Player.GetLineOfSight FenrirRef
    set WolfFollow to 0
    Message "'Fenrir, stay here.'"
    FenrirRef.RemoveScriptPackage
    FenrirRef.AddScriptPackage FenrirWander
    else
    set WolfFollow to 1
    FenrirRef.MoveTo Player 60 20 30
    Set fAngle to FenrirRef.GetAngle z + FenrirRef.GetHeadingAngle Player
    FenrirRef.SetAngle z fAngle
    Message "'Fenrir, come to me.'"
    FenrirRef.RemoveScriptPackage
    FenrirRef.AddScriptPackage FenrirFollow
    endif
    FenrirRef.PlayGroup Idle 1
    endif
    End

    Begin ScriptEffectFinish
    FenrirRef.EvaluatePackage
    End
×
×
  • Create New...