Recent content by 暗暗十分

  1. 暗暗十分

    Some findings of ParticleSystem

    I'm not positive on this, but it appears that when the attribute "emit_at_once"
    XML:
        <effect name="psys_game_burning_agent" guid="{42E394C5-21D5-409B-872C-DB082E417FE6}" sound_code="event:/mission/ambient/detail/fire/fire_small">
            <emitters>
                <emitter name="Emitter" _index_="0">
                    <flags>
                        <flag name="emit_while_moving" value="false"/>
                        <flag name="dont_emit_while_moving" value="true"/>
                        <flag name="emit_at_once" value="false"/>
    is set to false, the particle emitter will constantly emit the particles (ie. the particle system exists until the end of the mission). This seems to be the case for all the 'fire' type particle systems in 'particle_systems2.xml' including "psys_game_burning_agent" which you are using. When that attribute is set to true, and you call the system using the Mission method:
    C#:
    public void AddParticleSystemBurstByName(string particleSystem, MatrixFrame frame, bool synchThroughNetwork);
    Then it will only emit once.

    So, it seems like two things need to happen:
    1. Create a new fire particle system that has the 'emit_at_once' attribute set to true. (I couldn't seem to make new particle systems or override exiting ones, but I may have been making a mistake.)
    2. Use a mission behavior or some other method to periodically call AddParticleSystemBurstByName on your new fire particle system when your agent's sword is drawn.
    If you already figured this out, sorry for the long comment. Also, please share if you know how to add/alter particle systems.
    I've come up with a workaround and released my mod.
    check this out:

    And it's open source so you can check out my solution.
  2. 暗暗十分

    TW Probability calculations are incorrect, 0 does not mean 0

    The chances of a RNG returning 0 is like 1 in 10^16.
    It might take forever for all of MB2 players together to actually run into the issue one time.
  3. 暗暗十分

    Some findings of ParticleSystem

    If we are not aiming to destroy object physically correct, just for burn effect, replacing model on runtime wouldn't be performance-wise good imo.
    Easiest way would be altering material, making it getting darker and darker over time and perhaps shifting down to make it look like it's burning away.

    Have you checked anything about materials or decals? As far as I remember, when you burn someone, they weren't getting any darker or so. Which is a bit buzzkill. With material change, you can achieve scene-based burned objects a bit more realistically and with decals you can create area based burn effect, like burning small patch of grass on battlefields
    I think that might only be possible when the engine tools come out.
    I haven't even found a way to get the material instance of an agent's body not to mention changing it.
    There are not enough APIs, a lot of work are still being done in c++ level. Can't touch any of that part.
    I still can't figure out why they wouldn't return the reference of generated ParticleSystem, and why the API of AgentVisuals works while the other one of ParticleSystem doesn't.

    EDIT:
    Wait, I just found a Decal : GameEntityComponent which looks promising.
    I am gonna look into it to see if I can add some burnt visuals.
  4. 暗暗十分

    Some findings of ParticleSystem

    I haven't look at the Particle System or damage/burn decals yet, but is there any chance to slowly burn static objects without changing the effected object such as haystacks etc?
    To achieve that, first we need haystacks models of different phases, little burnt, half burnt, totally burnt etc.
    Without those all we can do is generate some fire particles on them and that doesn't look very convincing.
  5. 暗暗十分

    Some findings of ParticleSystem

    It's uncontrollable, like you can't make the enemy burns, the arrow will disapear when it hits a target due to the burning="true" flag,
    Actually you can achieve that only with XML. Adding this to WeaponFlags does the trick
    AmmoSticksWhenShot="true" Burning="true"
    I know it because I used that in Advanced Custom Battle mod months ago.

    But apart from that, you are right. What you are researching is way more valuable than simple XML editing.
    I can already see the Game of Thrones mods that will arise from this :smile:
    I've found a workaround for the particle issue.
    A working fire arrow and fire sword mod is on its way.

    Lit target on fire and deliver burning damages.
    Fire arrows sticked to object or ground will gradually burn out instead of disapering or remain burning forever.
    Lit your sword/axe/polearm with hot key and burn your enemies.
    Fires produce orange lights instead of white lights.

    All values are customizable by editing .ini file or in-game menu with help of ModLib.

    091HiO6.jpg

    tvYwgTH.jpg

    r3v2uGx.jpg

    AqqmY1s.jpg

    KAxFqaP.jpg
  6. 暗暗十分

    Some findings of ParticleSystem

    Nice researches, however I do believe this has already been done here: https://www.nexusmods.com/mountandblade2bannerlord/mods/472

    Like I said, I am aware that fire arrows can be achieved by editing xml.
    This mod only added trail_particle_name to all the arrow items.
    It's uncontrollable, like you can't make the enemy burns, the arrow will disapear when it hits a target due to the burning="true" flag, but without it the arrow stays with the particles on and consumes tons of GPU memory, the behaviours are all designed by native game and you have no controll over the logics.

    But by implementing it myself, I can get a lot of things done. Like the point lights on the arrows are white lights if you are using the xml way, but I added the point lights myself so I can make it orange which looks more like lights from a fire.

    And by implementing it myself, I can make the arrow stay where it hits instead of disapearing, and only remove the fire particles and point light so that GPU memory usage won't be too high.

    The main problem is still the exposed API doesn't return the reference of the ParticleSystem generated on an agent.
    I can make the hit target burns when he gets shot, but I can't make the fire go away after a few seconds, it will always be on the agent.
  7. 暗暗十分

    Some findings of ParticleSystem

    I've succesfully emitted particles on most GameEntities With this line of code I can create ParticleSystem on missiles, and so to make fire arrows. I am aware fire arrows can be achieved by editing xml, but I want control over these particles so that I can make even the enemies who got hit...
  8. 暗暗十分

    NEW MOD: Magic World for 1.011 Updated january 23th

    ...Okay...
    I haven't come here for a  long time....
    I've made a new mod after I made this , but that mod in Chinese only.
    And I am tired of making mod, so I stop update.

    If I have time, I  will spend some time in fixing bugs, but not now.

    I have to say again, sorry for my poor English.
  9. 暗暗十分

    NEW MOD: Magic World for 1.011 Updated january 23th

    guspav said:
    Very interesting magic system and fun mod... I am guessing it is open source as long as we give credit to the authors, right? I have been thinking of making a fantasy mod myself (being a d&d dungeon master,the idea is especially attractive) and if it's ok with you guys, I'd like to use part of your magic system (if not all).
    OK.
    You can use it...
  10. 暗暗十分

    NEW MOD: Magic World for 1.011 Updated january 23th

    Can you all believe it?
    I'm a fourteen-year-old middle school student.
    I have no time to updata this mod or fix any bug now, I (or you) need to wait until the summer vacation.
  11. 暗暗十分

    NEW MOD: Magic World for 1.011 Updated january 23th

    thionoxial said:
    I like the magic system of this mod and how its implemented, but not the difficulty level.

    For one, unless you /start/ with a wand (which ensures a strength of 1 and no starting weapon) - you have to buy one, which for me meant searching through 5 stores or so, until I found one for 16,000 - waaaaaaaaaaay beyond my price range, or even the price range of what I'd spend with my level 0 Native characters.

    So, if you start with a wand, your mostly fighting looters. But because 'vanilla fireball' doesn't kill very much or for very long, you'll be captured a few times...and they always, always ALWAYS take the wand.

    So for me, as much as I like the idea of magic, the mod isn't really playable.
    You should buy a sword, then chop....
  12. 暗暗十分

    NEW MOD: Magic World for 1.011 Updated january 23th

    CJ1145 said:
    How do you cast spells? Selecting spells and pressing "E" doesn't work, even though the man in Zendar told me that's how to do it.
    Oh, I'm sorry.
    It's the old version's translation, I updated the mod, but I forgot to updated the translation.
  13. 暗暗十分

    NEW MOD: Magic World for 1.011 Updated january 23th

    There is a new bug,that mage in Narra is not the right mage.
    I re-uploaded it to mbrepository, just re-download it.
    https://www.mbrepository.com/file.php?cid=1&id=1037
  14. 暗暗十分

    NEW MOD: Magic World for 1.011 Updated january 23th

    Fei Dao said:
    Also: Bug - Cat's grace is a permanent agility boost, it's supposed to only be temporary.

    Yeah, just a bug, a mistake.

    In module_scripts.py, the global variables are $Cats_grace...
    e.g:
    .............................................
                     (assign, "$Cats_grace_time", 200),
                     (assign, "$Cats_grace_Activated", 1),
    .............................................

    In module_mission_templates.py, the global variables are $Cat's_grace...
    e.g:
    .............................................
                                  (gt,"$Cat's_grace_time",0),
                                  (val_sub,"$Cat's_grace_time",1),
    .............................................

    In module_triggers.py, the global variables are $Cat's_grace...
    e.g:
    .............................................
                     (eq,"$Cat's_grace_Activated",1),
                     (assign,"$Cat's_grace_Activated",0),
                     (assign,"$Cat's_grace_time",0),
    .............................................

    So...





    In addition, AI mages have mana, too. Just you never know how much are left.
Back
Top Bottom