|
-
Adventurer
Gothic II Gold - Damage Formula Script
Hello everyone, I am trying to find and modify the basic damage script for weapons to make it similar to Gothic I, meaning that every point in STR is felt right away without the need of a critical hit and if possible change the Crit Hit to double weapon damage just like in Gothic I. I can't find the script though, the only thing I have found is the minimum damage calculated based on hit. Anybody that has done something similar that can give an insight on how to proceed?
-
The damage in Gothic is calculated by the engine, not the scripts. Unfortunately that means changing it is not very easy. There is a script using LeGo, but you would have to re-script a lot of the damage calculations.
-
Adventurer
Zitat von Lehona
The damage in Gothic is calculated by the engine, not the scripts. Unfortunately that means changing it is not very easy. There is a script using LeGo, but you would have to re-script a lot of the damage calculations.
Thanks for the reply, I am not very familiar with scripting but I might give it a go.
-
Adventurer
So, I have been practicing a little with the Gothic 2 scripts and I might have found a workaround that suits me if it can be done. Basically my idea is to remove critical chance skill altogether by making sure everybody starts at 100% hitchance. Problem is everybody would start with master skill animations. I have found the script that checks your hitchance and gives you the new rank and animations based on an input number, now if I can change this condition via script commands to check your strength for 1H and 2H animations and dexterity for shooting skills it would work pretty fine, should be fairly easy for someone familiar with the commands, I just don't know their meaning.
func void B_AddFightSkill(var C_Npc slf,var int talent,var int percent)
{
if(talent == NPC_TALENT_1H)
{
slf.HitChance[NPC_TALENT_1H] = slf.HitChance[NPC_TALENT_1H] + percent;
if(slf.HitChance[NPC_TALENT_1H] >= 0)
{
Npc_SetTalentSkill(slf,NPC_TALENT_1H,0);
};
if(slf.HitChance[NPC_TALENT_1H] >= 30)
{
Npc_SetTalentSkill(slf,NPC_TALENT_1H,1);
};
if(slf.HitChance[NPC_TALENT_1H] >= 60)
{
Npc_SetTalentSkill(slf,NPC_TALENT_1H,2);
};
};
So where it says if(slf.HitChance[NPC_TALENT_1H] >= 0) if somehow can be changed to check your real STR it should work. For example upon having 50 STR your rookie skills will develop to fighter skills. If someone knows how to do it or give me an idea where I can learn the meaning of the commands that I need would be of great help.
-
I think you should be able to replace 'slf.HitChance[NPC_TALENT_1H]' with 'slf.attribute[ATR_STRENGTH]' (and modify the numbers to check against according to your wishes).
-
Keep in mind, however, that this function is mainly called when the player's fight skill is raised -- if the player's strength increases, the function is not called automatically, so you may not see a change in the fight animation.
-
Adventurer
Zitat von Lehona
I think you should be able to replace 'slf.HitChance[NPC_TALENT_1H]' with 'slf.attribute[ATR_STRENGTH]' (and modify the numbers to check against according to your wishes).
Worked like a charm! Many thanks Lehona!
Zitat von Milky-Way
Keep in mind, however, that this function is mainly called when the player's fight skill is raised -- if the player's strength increases, the function is not called automatically, so you may not see a change in the fight animation.
Thanks for the tip, spot on, it doesn't level up automatically however it works for the NPCs which for me is more important. When STR requirements are met simply by reading fighting books or anything that improves hitchance like tablets sets the proper rank and animations. I have already created a book for advanced techniques (editing Southern Defense) and a book for expert techniques (same thing, slightly different) that works properly, would be cool if I manage to condition the books to be opened only if 30<STR<75 for first book and STR>75 for the second one but that's not a priority, it's pretty fun messing with scripts, is there an english tutorial on these commands on the website?
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
|
|