-
[G2/Scripting] Vatras Rede verändern/erweitern
Hallo zusammen,
ich hatte vor Vatras Rede, also die B_Preach_Vatras.d zu erweitern bzw. zu verändern, da in meiner Mod jemand anders dort steht und redet. Ich hab Soundfiles für die Rede, und hab das Skript angepasst, dass e nun bis satz == 30 geht.
Allerdings sind zwei Dinge komisch.
Erstens, der Satz mit (satz == 0) wird nicht ausgegeben. Der Redner nutzt eine Sprechanimation, aber das entsprechende Soundfile wird nicht abgespielt.
Und nach (satz == 20) [also da, wo das originale Skript endet], fängt der Redner wieder von vorn an.
Jetzt geh ich davon aus, dass vermutlich in irgendeiner Datei die maximale Anzahl an Sätzen vermerkt ist, und ich das nur auf 30 erhöhen muss. Die Frage ist nur... wo?
Und falls jemand weiß warum das erste Soundfile nicht ausgegeben wird, wär ich auch nicht böse drum.
Skript, falls es jemand braucht:
Code:
// ***************
// B_Preach_Vatras
// ***************
func void B_Preach_Vatras(var int satz)
{
if (satz == 0)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_00"); //...
};
if (satz == 1)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_01"); //...
};
if (satz == 2)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_02"); //...
};
if (satz == 3)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_03"); //...
};
if (satz == 4)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_04"); //...
};
if (satz == 5)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_05"); //...
};
if (satz == 6)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_06"); //...
};
if (satz == 7)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_07"); //...
};
if (satz == 8)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_08"); //...
};
if (satz == 9)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_09"); //...
};
if (satz == 10)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_10"); //...
};
if (satz == 11)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_11"); //...
};
if (satz == 12)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_12"); //...
};
if (satz == 13)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_13"); //...
};
if (satz == 14)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_14"); //...
};
if (satz == 15)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_15"); //...
};
if (satz == 16)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_16"); //...
};
if (satz == 17)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_17"); //...
};
if (satz == 18)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_18"); //...
};
if (satz == 19)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_19"); //...
};
if (satz == 20)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_20"); //...
};
if (satz == 21)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_21"); /...
};
if (satz == 22)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_22"); //...
};
if (satz == 23)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_23"); //...
};
if (satz == 24)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_24"); //...
};
if (satz == 25)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_25"); //...
};
if (satz == 26)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_26"); //...
};
if (satz == 27)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_27"); //...
};
if (satz == 28)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_28"); //...
};
if (satz == 29)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_29"); //...
};
if (satz == 30)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_30"); //...
};
};
Liebe Grüße
"Es ist nicht schwer, von jedem ethischen Prinzip zu beweisen, dass es in der Praxis scheitern muss, wenn man zugleich voraussetzt, dass allgemeiner Schwachsinn herrscht."
- John Stuart Mill
-
Nutzt du Visual Studio Code zusammen mit Kirides' Plugin?
Damit könntest du z.B. die Nutzung von "B_Preach_Vatras" suchen um über die einzelnen Funktionsaufrufe aufschluss darüber zu kriegen. Mit Strg-Klick auf den Methodennamen werden dir Nutzungen aufgelistet und du kannst per Doppelklick direkt an die entsprechende Stelle der entsprechenden Datei springen. Macht das Ganze deutlich angenehmer
-
And I suggest to use else-if structure because of performance.
Code:
// ***************// B_Preach_Vatras
// ***************
func void B_Preach_Vatras(var int satz)
{
if (satz == 0)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_00"); //...
} else if (satz == 1)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_01"); //...
} else if (satz == 2)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_02"); //...
} else if (satz == 3)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_03"); //...
} else if (satz == 4)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_04"); //...
} else if (satz == 5)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_05"); //...
} else if (satz == 6)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_06"); //...
} else if (satz == 7)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_07"); //...
} else if (satz == 8)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_08"); //...
} else if (satz == 9)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_09"); //...
} else if (satz == 10)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_10"); //...
} else if (satz == 11)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_11"); //...
} else if (satz == 12)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_12"); //...
} else if (satz == 13)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_13"); //...
} else if (satz == 14)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_14"); //...
} else if (satz == 15)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_15"); //...
} else if (satz == 16)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_16"); //...
} else if (satz == 17)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_17"); //...
} else if (satz == 18)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_18"); //...
} else if (satz == 19)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_19"); //...
} else if (satz == 20)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_20"); //...
} else if (satz == 21)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_21"); /...
} else if (satz == 22)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_22"); //...
} else if (satz == 23)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_23"); //...
} else if (satz == 24)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_24"); //...
} else if (satz == 25)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_25"); //...
} else if (satz == 26)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_26"); //...
} else if (satz == 27)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_27"); //...
} else if (satz == 28)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_28"); //...
} else if (satz == 29)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_29"); //...
} else if (satz == 30)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_30"); //...
};
};
Gladiator – fully German localized, total-conversion modification with original game flow [link]
-
Zitat von GenerationLost
Nutzt du Visual Studio Code zusammen mit Kirides' Plugin?
Damit könntest du z.B. die Nutzung von "B_Preach_Vatras" suchen um über die einzelnen Funktionsaufrufe aufschluss darüber zu kriegen. Mit Strg-Klick auf den Methodennamen werden dir Nutzungen aufgelistet und du kannst per Doppelklick direkt an die entsprechende Stelle der entsprechenden Datei springen. Macht das Ganze deutlich angenehmer
Nein, ich bin ganz oldschool mit dem Stampfer unterwegs. Aber die Idee kam mir prinzipiell auch schon. Ich hab mal das Verzeichnis durchsucht und geschaut welche Scripts das Wort "satz" benutzen, und abgesehen von B_Preach_Vatras sind es nur 2 .stf Dateien nämlich funcs.stf und keywords.stf
Also war mein Ansatz vielleicht nicht richtig...
Zitat von Damianut
And I suggest to use else-if structure because of performance.
Code:
// ***************// B_Preach_Vatras
// ***************
func void B_Preach_Vatras(var int satz)
{
if (satz == 0)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_00"); //...
} else if (satz == 1)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_01"); //...
} else if (satz == 2)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_02"); //...
} else if (satz == 3)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_03"); //...
} else if (satz == 4)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_04"); //...
} else if (satz == 5)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_05"); //...
} else if (satz == 6)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_06"); //...
} else if (satz == 7)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_07"); //...
} else if (satz == 8)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_08"); //...
} else if (satz == 9)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_09"); //...
} else if (satz == 10)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_10"); //...
} else if (satz == 11)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_11"); //...
} else if (satz == 12)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_12"); //...
} else if (satz == 13)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_13"); //...
} else if (satz == 14)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_14"); //...
} else if (satz == 15)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_15"); //...
} else if (satz == 16)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_16"); //...
} else if (satz == 17)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_17"); //...
} else if (satz == 18)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_18"); //...
} else if (satz == 19)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_19"); //...
} else if (satz == 20)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_20"); //...
} else if (satz == 21)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_21"); /...
} else if (satz == 22)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_22"); //...
} else if (satz == 23)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_23"); //...
} else if (satz == 24)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_24"); //...
} else if (satz == 25)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_25"); //...
} else if (satz == 26)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_26"); //...
} else if (satz == 27)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_27"); //...
} else if (satz == 28)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_28"); //...
} else if (satz == 29)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_29"); //...
} else if (satz == 30)
{
AI_Output (self, self, "DIA_Zaebos_PREACH_05_30"); //...
};
};
thanks! doesn't fix the problem, but thanks for the advice! I just altered the original Script, but i guess the PBs also made some lousy stuff^^
"Es ist nicht schwer, von jedem ethischen Prinzip zu beweisen, dass es in der Praxis scheitern muss, wenn man zugleich voraussetzt, dass allgemeiner Schwachsinn herrscht."
- John Stuart Mill
-
In ZS_Preach_Vatras_loop findest du Lösung
-
Zitat von neocromicon
In ZS_Preach_Vatras_loop findest du Lösung
Ahja, da hätte man aber auch selbst drauf kommen können. Danke.
Der erste Satz ist zwar immernoch stumm, aber was solls.
"Es ist nicht schwer, von jedem ethischen Prinzip zu beweisen, dass es in der Praxis scheitern muss, wenn man zugleich voraussetzt, dass allgemeiner Schwachsinn herrscht."
- John Stuart Mill
-
Zitat von Xardas1001
Ahja, da hätte man aber auch selbst drauf kommen können. Danke.
Der erste Satz ist zwar immernoch stumm, aber was solls.
Dann lasse dir doch per "print" die Werte ingame ausgeben, dann siehst du ja wo es los geht.
-
Der Satz ist stumm, wird aber angezeigt? Dann passt vielleicht etwas mit der Audio Kodierung nicht. Probier Mal, einfach einer Sound Datei aus dem original den Namen zu geben, dass sie abgespielt wird.
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
|