Recent content by Vetrogor

  1. Vetrogor

    Warband Script Enhancer 2 (v1.1.2.0)

    You can run Viking Conquest smoothly because they removed old morale scripts with new. Also number of polygons can affect the maximum fps. I.E., it is not WSE2 problem. It is your work as a modder.
  2. Vetrogor

    Warband Script Enhancer 2 (v1.1.2.0)

    Hello, I've noticed that certain mods tend to have fps issues combined with WSE2. For example, when I played Prophesy of Pendor, trying to have big battles with like 300-500 becomes super laggy. Same thing with A Clash of Kings, though something odd I noticed is that Siege battles in ACOK work fine without much fps drop but field battles tend to lag and stutter. On the other hand, I played Viking conquest with like 700 troops and even though there was a bit of lag, it functioned fine and was totally manageable. Are there certain mods that just tend to not work very well with WSE2? I have a very high end pc btw so the issue is not on my part I don't think.
    Native has morale scripts that causes stutters. Most mods are inherited that stutters. For PoP you can tweak that https://forums.taleworlds.com/index...of-pendor-tweaks-and-talk.386332/post-9750402
  3. Vetrogor

    [Native 1.174] Very easy request. How to force enemy AI to always charge immediately?

    In the mission you can find triggers with this scripts:
    Code:
    script_battle_tactic_init
    script_select_battle_tactic
    script_battle_tactic_apply
  4. Vetrogor

    Solution for "too many elements" in module_troops error.

    The last numbers of error message:
    0, 83, 0, 82, 0
    0 - is the string to the image that replaced troop 3D mesh in dialogs, usually 0
    83 - first troop upgrade path. It's ID=83
    0 - second troop upgrade path
    82, 0 - also upgrade path that added by function "upgrade" or "upgrade2" when used second time.
    Conclusion: if you see more than 3 numbers at the end than it is upgrade error.
  5. Vetrogor

    PYTHON SCRIPT/SCHEME EXCHANGE

    This script can be used for right shifting flag bits. For example, you can define flag_constant = 8. You can just rshift of 3 in the code. But what if you want to change flag_constant =16. Than you need to search all right shifting of 3 and change to 4. With this script it can be done automatically.
    Python:
     # script_store_log_2
      # Input:  value
      # Output: reg0 - log2(value)
      # Note: value should be power of 2 and equal to 0
      ("store_log_2", [
        (store_script_param, ":value", 1),
        (assign, ":end", 1),
        (try_for_range, ":result", 0, ":end"),
          (gt, ":end", 1000000), # prevent soft lock
        (else_try),
          (eq, ":value", 1),
        (else_try),
          (val_add, ":end", 1),
          (val_rshift, ":value", 1),
        (try_end),
        (assign, reg0, ":result"),
      ]),
  6. Vetrogor

    Perisno Mod Bug Reports

    Hello!
    Could someone explain me, what is with the dead NPC long arm glitch?
    Is there any way to solve this, or it is a known bug and will be solved in the next patch?
    I'm playing with v1.4.5 and it happens specifically with the Giants!

    Thanks in advance!
    Unequip items on death. Info from Dalion.
  7. Vetrogor

    Warband Script Enhancer 2 (v1.1.2.0)

    I have never seen mod with correct values in options. Because Native has error in the max size. So they all inherited that error.

    @K700 , no need to make special option in game for fBattleSize=10.000000. Just create loader with such options.
    Other options that should be in the launcher:
    1) Выбор языка
    Настройка находится в
    %AppData%\Roaming\Mount&Blade Warband WSE2\language.txt
    2) bCheatMode
    3) bEditMode
    4) iMaxFrameRate
    5) bShowFrameRate
    5) iAttributeLimit
    6) fBattleSize
    Нужно сделать несколько опций на выбор
    0.2 / 0.5 / 1.0 / 1.5 / 2.0 / 5.0 / 10.0
    7) bShowScreenshotPath
    :cool: iScreenshotFormat
    9) fSoundVolume
    10) fMusicVolume
    11) [Profiling]
    bEnabled
  8. Vetrogor

    Warband Script Enhancer 2 (v1.1.2.0)

    Interesting. Show getModifierProbability(), please.
  9. Vetrogor

    Warband Script Enhancer 2 (v1.1.2.0)

    Also setModifierQuality(), setItemKind() and operators reset_item_probabilities and set_item_probability_in_merchandise. Thanks in advance.
  10. Vetrogor

    Warband Script Enhancer 2 (v1.1.2.0)

    Code:
    void mbGame::addMerchandiseToTroop(int type, int amount, int troopNo, int factionNo)
    {
        mbTroop *troop = getTroop(troopNo);
        rglVector<int> itemKindNos;
        rglVector<float> thresholds;
        float totalThreshold = 0.0f;
    
        for (int i = 0; i < g_numItemKinds; ++i)
        {
            mbItemKind *itemKind = &g_itemKinds[i];
    
            if (itemKind->getType() == type && !itemKind->isUnique() && itemKind->isMerchandise() && (factionNo < 0 || itemKind->isAvailableForFaction(factionNo)))
            {
                itemKindNos.push(i);
                thresholds.push(totalThreshold);
                totalThreshold += itemKind->m_abundance * itemKind->m_probability * 0.01f;
            }
        }
    
        if (!itemKindNos.empty())
        {
            for (int i = 0; i < amount; ++i)
            {
                float randomThreshold = rglRandf() * totalThreshold;
                int itemKindIndex = 0;
    
                for (size_t j = 1; j < thresholds.size() && thresholds[j] <= randomThreshold; ++j)
                {
                    itemKindIndex++;
                }
    
                int firstFreeInventorySlot = troop->getFirstFreeInventorySlot();
    
                if (firstFreeInventorySlot >= 0)
                {
                    troop->m_inventory[firstFreeInventorySlot].setItemKind(itemKindNos[itemKindIndex]);
                    troop->m_inventory[firstFreeInventorySlot].setModifierQuality(m_merchandiseModifierQuality);
                }
            }
        }
    
        troop->m_inventory.compactSort(troop->getNumInventorySlots());
    }
    Thanks. Where is m_merchandiseModifierQuality defined?
  11. Vetrogor

    Warband Script Enhancer 2 (v1.1.2.0)

    @K700, can you show how troop_add_merchandise_with_faction works? I am making a replacer without limit of 16 factions.
  12. Vetrogor

    Adding, not replacing music

    You need to narrow your question as it is very broad now. Do you modify module system or txt files?
  13. Vetrogor

    Adding, not replacing music

    What you want is doable with scripting. You need to change script_music_set_situation_with_culture or something related to it.
  14. Vetrogor

    Warband Script Enhancer 2 (v1.1.2.0)

    Thanks a lot. So dependency is not linear and not possible to recreate.
Back
Top Bottom