Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Ergebnis 1 bis 7 von 7
  1. Beiträge anzeigen #1 Zitieren
    Adventurer
    Registriert seit
    Nov 2018
    Beiträge
    50
     
    YoungManRumble ist offline

    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?

  2. Beiträge anzeigen #2 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.447
     
    Lehona ist offline
    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.

  3. Beiträge anzeigen #3 Zitieren
    Adventurer
    Registriert seit
    Nov 2018
    Beiträge
    50
     
    YoungManRumble ist offline
    Zitat Zitat von Lehona Beitrag anzeigen
    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.

  4. Beiträge anzeigen #4 Zitieren
    Adventurer
    Registriert seit
    Nov 2018
    Beiträge
    50
     
    YoungManRumble ist offline
    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.

  5. Beiträge anzeigen #5 Zitieren
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.447
     
    Lehona ist offline
    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).

  6. Beiträge anzeigen #6 Zitieren
    now also in your universe  Avatar von Milky-Way
    Registriert seit
    Jun 2007
    Beiträge
    15.246
     
    Milky-Way ist offline
    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.

  7. Beiträge anzeigen #7 Zitieren
    Adventurer
    Registriert seit
    Nov 2018
    Beiträge
    50
     
    YoungManRumble ist offline
    Zitat Zitat von Lehona Beitrag anzeigen
    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 Zitat von Milky-Way Beitrag anzeigen
    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
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide