;Oscuro's Oblivion Overhaul
if ( isModLoaded "Oscuro's_Oblivion_Overhaul.esp" )
runScriptLine "set zzzObXPthievery.JOG01BladeDone to getStageDone JOG01Blade 100"
runScriptLine "set zzzObXPthievery.JOG01LerienDone to getStageDone JOG01Lerien 100"
runScriptLine "set zzzObXPthievery.JOG01T01Done to getStageDone JOG01T01 100"
runScriptLine "set zzzObXPthievery.JOG01T02Done to getStageDone JOG01T02 100"
runScriptLine "set zzzObXPthievery.JOG01T03Done to getStageDone JOG01T03 100"
runScriptLine "set zzzObXPthievery.JOG01T04Done to getStageDone JOG01T04 100"
runScriptLine "set zzzObXPthievery.JOG01T05Done to getStageDone JOG01T05 100"
runScriptLine "set zzzObXPthievery.JOG01T06Done to getStageDone JOG01T06 120"
runScriptLine "set zzzObXPthievery.JOG01T07Done to getStageDone JOG01T07 100"
runScriptLine "set zzzObXPthievery.JOG01T08Done to getStageDone JOG01T08 100"
runScriptLine "set zzzObXPthievery.JOG01T09Done to getStageDone JOG01T09 100"
runScriptLine "set zzzObXPthievery.JOG01T10Done to getStageDone JOG01T10 120"
runScriptLine "set zzzObXPthievery.JOG01T11Done to getStageDone JOG01T11 70"
scn zzzObXPthieveryScpt
;this script controls XP gained for completing various user-made mod quests
;thanks to SirFrederik for this script! all the credit for this goes to him!
;array index variables
int i
;XP variables
float gainedXP
;temp variables
short tempShort
short tempShort2
int tempInt
long tempLong
float tempFloat
float tempFloat2
float tempFloat3
ref tempRef
string_var tempString
;quest delay time
float fQuestDelayTime
;array containing all quest variables
array_var arrayQuests
;array containing all quest names
array_var arrayQuestNames
;array containing all quest XP values
array_var arrayQuestXP
;quest stage variables
;thievery in the imperial city
short JOG01BladeDone
short JOG01LerienDone
short JOG01T01Done
short JOG01T02Done
short JOG01T03Done
short JOG01T04Done
short JOG01T05Done
short JOG01T06Done
short JOG01T07Done
short JOG01T08Done
short JOG01T09Done
short JOG01T10Done
short JOG01T11Done
begin gamemode
;update script every <scriptQuestDelay> seconds
if ( fQuestDelayTime != ObXPSettings.scriptQuestDelay )
set fQuestDelayTime to ObXPSettings.scriptQuestDelay
endif
;check if mod is initialized
if ( ObXPMain.initialized == 0 )
return
endif
;initialize/clean arrays
if ( getGameLoaded )
;construct / clean arrays
if ( arrayQuests == 0 )
let arrayQuests := ar_Construct Array
else
ar_Erase arrayQuests 0:ar_Size arrayQuests
endif
if ( arrayQuestNames == 0 )
let arrayQuestNames := ar_Construct Array
else
ar_Erase arrayQuestNames 0:ar_Size arrayQuestNames
endif
if ( arrayQuestXP == 0 )
let arrayQuestXP := ar_Construct Array
else
ar_Erase arrayQuestXP 0:ar_Size arrayQuestXP
endif
;set initial array values to 1 to allow checking whether a quest was completed before using the mod
let i := 0
while ( i <= 66 )
let arrayQuests[i] := 1
let i := i + 1
loop
;thievery in the imperial city
let arrayQuestNames[1000] := "Die Schattenklinge"
let arrayQuestXP[1000] := 50
let arrayQuestNames[1001] := "Das Rätsel um Leriens Schicksal"
let arrayQuestXP[1001] := 100
let arrayQuestNames[1002] := "Iniel Sintavs Amulett"
let arrayQuestXP[1002] := 50
let arrayQuestNames[1003] := "Ringlose Dralora"
let arrayQuestXP[1003] := 50
let arrayQuestNames[1004] := "Edelstein in Gefahr"
let arrayQuestXP[1004] := 50
let arrayQuestNames[1005] := "Alter Datoh-Brandy"
let arrayQuestXP[1005] := 50
let arrayQuestNames[1006] := "Der verlassene Laden"
let arrayQuestXP[1006] := 50
let arrayQuestNames[1007] := "Gelegenheitsarbeit"
let arrayQuestXP[1007] := 50
let arrayQuestNames[1008] := "Silber-Sammler"
let arrayQuestXP[1008] := 50
let arrayQuestNames[1009] := "Von der Dwemer-Handwerkskunst"
let arrayQuestXP[1009] := 50
let arrayQuestNames[1010] := "Ein kostbares Rüstungsteil"
let arrayQuestXP[1010] := 50
let arrayQuestNames[1011] := "Ein unzufriedener Kunde"
let arrayQuestXP[1011] := 80
let arrayQuestNames[1012] := "Ein Magier und sein Spielzeug"
let arrayQuestXP[1012] := 120
endif
;update quest stage variables
;thievery in the imperial city
if ( isModLoaded "thievery.esp" )
runScriptLine "set zzzObXPthievery.JOG01BladeDone to getStageDone JOG01Blade 100"
runScriptLine "set zzzObXPthievery.JOG01LerienDone to getStageDone JOG01Lerien 100"
runScriptLine "set zzzObXPthievery.JOG01T01Done to getStageDone JOG01T01 100"
runScriptLine "set zzzObXPthievery.JOG01T02Done to getStageDone JOG01T02 100"
runScriptLine "set zzzObXPthievery.JOG01T03Done to getStageDone JOG01T03 100"
runScriptLine "set zzzObXPthievery.JOG01T04Done to getStageDone JOG01T04 100"
runScriptLine "set zzzObXPthievery.JOG01T05Done to getStageDone JOG01T05 100"
runScriptLine "set zzzObXPthievery.JOG01T06Done to getStageDone JOG01T06 120"
runScriptLine "set zzzObXPthievery.JOG01T07Done to getStageDone JOG01T07 100"
runScriptLine "set zzzObXPthievery.JOG01T08Done to getStageDone JOG01T08 100"
runScriptLine "set zzzObXPthievery.JOG01T09Done to getStageDone JOG01T09 100"
runScriptLine "set zzzObXPthievery.JOG01T10Done to getStageDone JOG01T10 120"
runScriptLine "set zzzObXPthievery.JOG01T11Done to getStageDone JOG01T11 70"
endif
;set array values - done each time the script runs
;thievery in the imperial city
let arrayQuests[1000] := ( arrayQuests[1000] ) * JOG01BladeDone
let arrayQuests[1001] := ( arrayQuests[1001] ) * JOG01LerienDone
let arrayQuests[1002] := ( arrayQuests[1002] ) * JOG01T01Done
let arrayQuests[1003] := ( arrayQuests[1003] ) * JOG01T02Done
let arrayQuests[1004] := ( arrayQuests[1004] ) * JOG01T03Done
let arrayQuests[1005] := ( arrayQuests[1005] ) * JOG01T04Done
let arrayQuests[1006] := ( arrayQuests[1006] ) * JOG01T05Done
let arrayQuests[1007] := ( arrayQuests[1007] ) * JOG01T06Done
let arrayQuests[1008] := ( arrayQuests[1008] ) * JOG01T07Done
let arrayQuests[1009] := ( arrayQuests[1009] ) * JOG01T08Done
let arrayQuests[1010] := ( arrayQuests[1010] ) * JOG01T09Done
let arrayQuests[1011] := ( arrayQuests[1011] ) * JOG01T10Done
let arrayQuests[1012] := ( arrayQuests[1012] ) * JOG01T11Done
let i := 0
while ( i < ar_Size arrayQuests )
;if an array entry is 0, the player hasn't completed the quest yet - set these to 2 for the next time the script is run
;next, if the entry is 1, it means player already completed the corresponding quest before using the mod
;then, if any entry is 2 (which is only possible the next time the script is run), the player completed the quest and XP should be given
;set completed quest entries to 3 so XP will only be awarded once
let tempShort := arrayQuests[i]
if ( tempShort == 0 )
let arrayQuests[i] := 2
elseif ( tempShort == 1 )
let arrayQuests[i] := 3
elseif ( tempShort == 2 )
;set amount of XP gained
let gainedXP := ( 1 + ObXPMain.playerLevel * ObXPSettings.multXPQuestLevel ) * ObXPSettings.globalQuestXPMult * arrayQuestXP[i]
let tempString := arrayQuestNames[i]
;account for rested XP
if ( ObXPMain.restedXP - gainedXP >= 0 )
let tempFloat := gainedXP
let ObXPMain.restedXP := ObXPMain.restedXP - gainedXP
let gainedXP := gainedXP * 2
else
let tempFloat := ObXPMain.restedXP
let gainedXP := gainedXP + ObXPMain.restedXP
let ObXPMain.restedXP := 0
endif
let ObXPMain.currentXP := ObXPMain.currentXP + gainedXP
let ObXPMain.totalXP := ObXPMain.totalXP + gainedXP
let tempFloat2 := ObXPMain.currentXP
let tempFloat3 := ObXPMain.neededXP
;print XP gain message to log
let tempString := sv_Construct "%.2f XP gewonnen. Auftrag %q%z%q abgeschlossen." gainedXP, tempString
if ( ObXPUIControl.lineNumber > ObXPSettings.messageBufferSize )
;erase first message
ar_Erase ObXPUIControl.arrayMessageBuffer 0
let ObXPUIControl.arrayMessageBuffer[ObXPSettings.messageBufferSize - 1] := sv_Construct "%z" tempString
else
let ObXPUIControl.arrayMessageBuffer[ObXPUIControl.lineNumber] := sv_Construct "%z" tempString
endif
let ObXPUIControl.lineNumber := ObXPUIControl.lineNumber + 1
let arrayQuests[i] := 3
endif
let i := i + 1
loop
sv_Destruct tempString
end
Hallo Sturmbrecher,
ich habe es gerade ausprobiert. DarN und Oblivion XP 4.1.2 waren installiert.
Ich habe einfach das Verzeichnis DarN geöffnet und das Data-Verzeichnis ins Oblivion-Verzeichnis kopiert.
Danach habe ich Oblivion gestartet, und es ist alles in Ordnung. Alles Menus sind von DarN.
Ist kein Kopierfehler. Das kann natürlich nicht funktionieren...danke für den Hinweis. Wird sofort ausprobiert, ob es wirklich nur daran lag.
edit:
So sieht der Script jetzt aus. Diese ganzen Befehle habe ich teilweise auch noch nie gesehen, aber ich habe ja nur die jeweiligen Quest-IDs, Stages und (jetzt auch) Plugin-Namen angepasst, sonst habe ich nichts verändert. Funktionieren tut's aber leider trotzdem nicht. :?
scn zzzObXPthieveryScpt
;this script controls XP gained for completing various user-made mod quests
;thanks to SirFrederik for this script! all the credit for this goes to him!
;array index variables
int i
;XP variables
float gainedXP
;temp variables
short tempShort
short tempShort2
int tempInt
long tempLong
float tempFloat
float tempFloat2
float tempFloat3
ref tempRef
string_var tempString
;quest delay time
float fQuestDelayTime
;array containing all quest variables
array_var arrayQuests
;array containing all quest names
array_var arrayQuestNames
;array containing all quest XP values
array_var arrayQuestXP
;quest stage variables
;thievery in the imperial city
short JOG01BladeDone
short JOG01LerienDone
short JOG01T01Done
short JOG01T02Done
short JOG01T03Done
short JOG01T04Done
short JOG01T05Done
short JOG01T06Done
short JOG01T07Done
short JOG01T08Done
short JOG01T09Done
short JOG01T10Done
short JOG01T11Done
begin gamemode
;update script every <scriptQuestDelay> seconds
if ( fQuestDelayTime != ObXPSettings.scriptQuestDelay )
set fQuestDelayTime to ObXPSettings.scriptQuestDelay
endif
;check if mod is initialized
if ( ObXPMain.initialized == 0 )
return
endif
;initialize/clean arrays
if ( getGameLoaded )
;construct / clean arrays
if ( arrayQuests == 0 )
let arrayQuests := ar_Construct Array
else
ar_Erase arrayQuests 0:ar_Size arrayQuests
endif
if ( arrayQuestNames == 0 )
let arrayQuestNames := ar_Construct Array
else
ar_Erase arrayQuestNames 0:ar_Size arrayQuestNames
endif
if ( arrayQuestXP == 0 )
let arrayQuestXP := ar_Construct Array
else
ar_Erase arrayQuestXP 0:ar_Size arrayQuestXP
endif
;set initial array values to 1 to allow checking whether a quest was completed before using the mod
let i := 0
while ( i <= [COLOR=Red]12[/COLOR])
let arrayQuests[i] := 1
let i := i + 1
loop
[COLOR=Red];note that the above takes the biggest number below (12), it simply
;initializes all the array entries[/COLOR]
;thievery in the imperial city
let arrayQuestNames[[COLOR=Red]0[/COLOR]] := "Die Schattenklinge"
let arrayQuestXP[[COLOR=Red]0[/COLOR]] := 50
let arrayQuestNames[1] := "Das Rätsel um Leriens Schicksal"
let arrayQuestXP[1] := 100
let arrayQuestNames[2] := "Iniel Sintavs Amulett"
let arrayQuestXP[2] := 50
let arrayQuestNames[3] := "Ringlose Dralora"
let arrayQuestXP[3] := 50
let arrayQuestNames[4] := "Edelstein in Gefahr"
let arrayQuestXP[4] := 50
let arrayQuestNames[5] := "Alter Datoh-Brandy"
let arrayQuestXP[5] := 50
let arrayQuestNames[6] := "Der verlassene Laden"
let arrayQuestXP[6] := 50
let arrayQuestNames[7] := "Gelegenheitsarbeit"
let arrayQuestXP[7] := 50
let arrayQuestNames[8] := "Silber-Sammler"
let arrayQuestXP[8] := 50
let arrayQuestNames[9] := "Von der Dwemer-Handwerkskunst"
let arrayQuestXP[9] := 50
let arrayQuestNames[10] := "Ein kostbares Rüstungsteil"
let arrayQuestXP[10] := 50
let arrayQuestNames[11] := "Ein unzufriedener Kunde"
let arrayQuestXP[11] := 80
let arrayQuestNames[12] := "Ein Magier und sein Spielzeug"
let arrayQuestXP[12] := 120
[COLOR=Red];all these [U]start at 0[/U], and get [U]1 bigger[/U] for each new entry - there is NO
;way around this!![/COLOR]
endif
;update quest stage variables
;thievery in the imperial city
if ( isModLoaded "thievery.esp" )
runScriptLine "set zzzObXPthievery.JOG01BladeDone to getStageDone JOG01Blade 100"
runScriptLine "set zzzObXPthievery.JOG01LerienDone to getStageDone JOG01Lerien 100"
runScriptLine "set zzzObXPthievery.JOG01T01Done to getStageDone JOG01T01 100"
runScriptLine "set zzzObXPthievery.JOG01T02Done to getStageDone JOG01T02 100"
runScriptLine "set zzzObXPthievery.JOG01T03Done to getStageDone JOG01T03 100"
runScriptLine "set zzzObXPthievery.JOG01T04Done to getStageDone JOG01T04 100"
runScriptLine "set zzzObXPthievery.JOG01T05Done to getStageDone JOG01T05 100"
runScriptLine "set zzzObXPthievery.JOG01T06Done to getStageDone JOG01T06 120"
runScriptLine "set zzzObXPthievery.JOG01T07Done to getStageDone JOG01T07 100"
runScriptLine "set zzzObXPthievery.JOG01T08Done to getStageDone JOG01T08 100"
runScriptLine "set zzzObXPthievery.JOG01T09Done to getStageDone JOG01T09 100"
runScriptLine "set zzzObXPthievery.JOG01T10Done to getStageDone JOG01T10 120"
runScriptLine "set zzzObXPthievery.JOG01T11Done to getStageDone JOG01T11 70"
endif
;set array values - done each time the script runs
;thievery in the imperial city
let arrayQuests[0] := ( arrayQuests[0] ) * JOG01BladeDone
let arrayQuests[1] := ( arrayQuests[1] ) * JOG01LerienDone
let arrayQuests[2] := ( arrayQuests[2] ) * JOG01T01Done
let arrayQuests[3] := ( arrayQuests[3] ) * JOG01T02Done
let arrayQuests[4] := ( arrayQuests[4] ) * JOG01T03Done
let arrayQuests[5] := ( arrayQuests[5] ) * JOG01T04Done
let arrayQuests[6] := ( arrayQuests[6] ) * JOG01T05Done
let arrayQuests[7] := ( arrayQuests[7] ) * JOG01T06Done
let arrayQuests[8] := ( arrayQuests[8] ) * JOG01T07Done
let arrayQuests[9] := ( arrayQuests[9] ) * JOG01T08Done
let arrayQuests[10] := ( arrayQuests[10] ) * JOG01T09Done
let arrayQuests[11] := ( arrayQuests[11] ) * JOG01T10Done
let arrayQuests[12] := ( arrayQuests[12] ) * JOG01T11Done
let i := 0
while ( i < ar_Size arrayQuests )
;if an array entry is 0, the player hasn't completed the quest yet - set these to 2 for the next time the script is run
;next, if the entry is 1, it means player already completed the corresponding quest before using the mod
;then, if any entry is 2 (which is only possible the next time the script is run), the player completed the quest and XP should be given
;set completed quest entries to 3 so XP will only be awarded once
let tempShort := arrayQuests[i]
if ( tempShort == 0 )
let arrayQuests[i] := 2
elseif ( tempShort == 1 )
let arrayQuests[i] := 3
elseif ( tempShort == 2 )
;set amount of XP gained
let gainedXP := ( 1 + ObXPMain.playerLevel * ObXPSettings.multXPQuestLevel ) * ObXPSettings.globalQuestXPMult * arrayQuestXP[i]
let tempString := arrayQuestNames[i]
;account for rested XP
if ( ObXPMain.restedXP - gainedXP >= 0 )
let tempFloat := gainedXP
let ObXPMain.restedXP := ObXPMain.restedXP - gainedXP
let gainedXP := gainedXP * 2
else
let tempFloat := ObXPMain.restedXP
let gainedXP := gainedXP + ObXPMain.restedXP
let ObXPMain.restedXP := 0
endif
let ObXPMain.currentXP := ObXPMain.currentXP + gainedXP
let ObXPMain.totalXP := ObXPMain.totalXP + gainedXP
let tempFloat2 := ObXPMain.currentXP
let tempFloat3 := ObXPMain.neededXP
;print XP gain message to log
let tempString := sv_Construct "%.2f XP gewonnen. Auftrag %q%z%q abgeschlossen." gainedXP, tempString
if ( ObXPUIControl.lineNumber > ObXPSettings.messageBufferSize )
;erase first message
ar_Erase ObXPUIControl.arrayMessageBuffer 0
let ObXPUIControl.arrayMessageBuffer[ObXPSettings.messageBufferSize - 1] := sv_Construct "%z" tempString
else
let ObXPUIControl.arrayMessageBuffer[ObXPUIControl.lineNumber] := sv_Construct "%z" tempString
endif
let ObXPUIControl.lineNumber := ObXPUIControl.lineNumber + 1
let arrayQuests[i] := 3
endif
let i := i + 1
loop
sv_Destruct tempString
end
Suzie Q schrieb:Hallo Fellan,
wie hast du diesen Script denn ins Spiel gebracht, als Zusatzscript in die Oblivion XP.esp, oder als Extra-Datei?
Falls du es als Extra-Datei herausgebracht hast, ist diese Datei von Oblivion XP.esp abhängig?
Since the most complex scripts I wrote on my own are simple activator scripts, I don't have much of a clue about those script arrays.
I'll try your fixed script immediately, thanks for your help (even if you might not read this)!
Und natürlich danke an Suzie Q für das Weiterleiten.
edit: Hm, the script doesn't work either...
Extra-Datei, von der Oblivion XP.esp abhängig.
edit: Ich sehe gerade, unter "Parent Masters" ist nur die Oblivion.esm gelistet. Eigentlich sollten aber auch die Oblivion XP.esp und die thievery.esp gelistet sein. Die habe ich auch beide immer mitgeladen, habe jetzt auch schon mehrmals versucht, ein neues Plugin zu erstellen, aber unter "Parent Masters" steht immer nur die Oblivion.esm, keine der beiden ESPs (die ja beim Speichern mit aktiviert waren!). Wie kriege ich das denn hin??
I wanted to have single support plugins for each user-created quest mod instead of making people overwrite their original Oblivion XP.esp. If a new version of ObXP is being released, someone would have to re-implement the support scripts for the user-created quest mods.
Anyways, I'll try adding the script to the Oblivion XP.esp, hopefully it will work then.
Thanks for your help again.