[Guide] Adding New Units [WIP]

Discussion in 'Modding' started by Setakat, Oct 4, 2016.

  1. Kiergath

    Kiergath New Member

    Setakat - amazing work here! My own dabbling was mostly already done for me and, as you said, not particularly well documented. Your guide seems to work perfectly from start to finish; just implemented an alternately skinned Austrian line infantryman that A. Soldier passed along to me from Furious Peasant. It did, however, lead to a fascinating problem that Soldier felt I should bring it up to you, as you might either run into it yourself eventually or have a solution.

    I present to you two pictures, the only difference between which was that I scrolled to the right between shots.


    It works splendidly. At least until you scroll too far off to the right! They look remarkably like little plastic toy soldiers, really.
    Ah, and on double checking, half the time they just start out blue no matter where you scroll and the other half they do the "Yep, we're working, trust us!" until you scroll off a bit.
  2. Setakat

    Setakat Member

    Thanks - my own game folder is a bit of a mess with all this dabbling to create this guide. I'm actually surprised I managed to pull out all the correct steps.

    I haven't seen that problem before, since I haven't tried changing textures yet. I've been trying to change the reference for the mounted musketeer model since the game seems to keep the person and horse separate, but it looks like despite the animations being referenced in the .actor file, the models themselves hold onto a reference. Or there is yet another file that the configuration is stuffed into that I haven't yet found (which really wouldn't surprise me at this point)
    As for the issue, I haven't seen that before, although I suspect whatever is causing it may possibly be related to the model pop you get when a building scrolls off/on the bottom or right of the screen. At a guess with 192 formations marching around the place, it seems that when the buildings ground collision is no longer detectable as being within the current viewport, the model (and sequentially shadows) are switched off, which leads to a tall building suddenly dis/reappearing at the bottom, or the shadow it casts on the right.

    Sorry :(
  3. A. Soldier

    A. Soldier Active Member

    We can give you the textures we used if you want.
  4. Setakat

    Setakat Member

    Maybe in a few days time. I've figured out something else sort of related to unit editing, and I want to investigate it a bit further. It may go somewhere (hopefully big) or be a modding dead end. I'm hoping for the former.

    That and I'm currently trying to tweak the Turkish Archer into a semi decent unit. Judging from the model and comparing it to uniforms here, it looks as if they are meant to be Janissary Archers. So I want to turn them into an elite archer compared to the regular mass produced Algerian Archer.
  5. A. Soldier

    A. Soldier Active Member

    Alright so a little update to Kiergath's report on our problem, I managed to get it to work, finally. with the help of his files.

    I got this: http://steamcommunity.com/id/A_Soldier/screenshot/263849659129666556

    A mostly white Musketeer, I can't really explain it to myself why is that.

    Another thing was that when scrolling right they all turned yellow, when going down to them in freecamera mode they go green and when issued a move order they go red initially after which they turn to white again.

    I have absolutely no idea what we've done wrong but I'm guessing we need to strictly follow the 18th Century Prussian Musketeer in the files in order to get the new unit in the game, which will take us a hell of a lot of time. If it's the same process as with buildings, I suggest we try one more time and after that postpone it until official workshop support arrives.

    Seems like this is above our league, at least for now.
  6. Zakxaev68

    Zakxaev68 Active Member

    Blockhouses. Most excited for the outcome, A. Soldier!
  7. A. Soldier

    A. Soldier Active Member

  8. Aistis1990

    Aistis1990 Active Member

    Standard bearers should look more like in AQ game to be honest. And French flag was a Bourbon one. Not tri color one. lol
  9. A. Soldier

    A. Soldier Active Member

    They would if we weren't so limited as to modding tools, and yes the creator already stated that he acknowledges that it's the wrong flag due to the small size of the texture, so the correct flag would look pixaleted and just plain weird IF it was did in that small size.

    I am sure the mistake will be corrected once we get proper modding tools.
  10. Ebel

    Ebel Moderator Staff Member

    Can you tell me which tools you think you need to make standard bearers look more like in AQ? Be specific.
  11. A. Soldier

    A. Soldier Active Member

    Well since I'm not really a modeler/texture maker I'm not really sure, I just thought we need model tools to make the flags bigger or something, but thinking about if you can make buildings bigger, can't you already make the flags bigger, or it doesn't work like that?

    Either way I'm unaware and unable to answer your question, but currently I don't think we're able to make animations for example right now.
  12. Warfare_Su

    Warfare_Su New Member

    Could you please explain,
    1) what is objprop.aiforce ? What it is responsible for ?
    2) SetObjBaseWeapon(objprop, objbase, 0, 12, 0, 20, 65, 0, 100000, gc_obj_weapon_kind_pike, True) As i understood 100000 is the maximum enemy detection radius. Is it true ?
  13. Setakat

    Setakat Member

    1) I'm not actually sure what the aiforce parameter does. Quick poke though the scripts indicates it might be tied into calculating how powerful the army is for the AI.
    2) Yep, the 100000 is the maximum detection radius.
  14. Warfare_Su

    Warfare_Su New Member

    Then what is the measurement ? I mean 100000 is meters, miles or what ? :)

    For example, pikemans has 100 radiusmax and 100000 detectradiusmax. I cant understand this )) Please advise
  15. Demoul

    Demoul Well-Known Member

    It turned out to create a new detachment. But when I write detachment to line the officers, the script in the game gives an error: Warning. Error compiling scripts. Try verify steam cache.
    I am writing this:
    AddOfficersFormationInfExt(country, ind, 'officer18', 'drummer18', 'pikeman18', 'pikeman18swe', 'pandur', 'chasseur', 'highlander', 'musketeer18', 'musketeer18pru', 'grenadier', 'musketeer18den', 'grenadierden', 'grenadierpru', 'musketeer18bav', 'grenadierbav', 'musketeer18sax', 'grenadiersax', 'musketeer18rus');
  16. Loner

    Loner Well-Known Member

    For some reason, in my experience, you're only allowed to have 17 slots, adding 'musketeer18rus' makes 18.:)
  17. A. Soldier

    A. Soldier Active Member

    Have you checked the dmscript.global file if it has a listed limit?

    Because in my experience, it solved 1 or 2 problems with the limits I had with formations.
  18. Loner

    Loner Well-Known Member

    This could well be the answer, but I can't find the correct line in the file ( dmscript.global ).:(
    A. Soldier likes this.
  19. Demoul

    Demoul Well-Known Member

    Loner, Thanks for the answer!
  20. Demoul

    Demoul Well-Known Member

    Loner you're right! I now replaced the musketeer of Saxony with the Russian and the game started.
    Now the question is how to increase the slots :)))))
    Loner likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice