Page 1 of 4 1234 LastLast
Results 1 to 50 of 163

The Ultimate 'How to make a new Faction' Tutorial!

  1. #1

    The Ultimate 'How to make a new Faction' Tutorial!

    1. Open up Corsix's Mod Tools. And Load your mod / create a new mod.

    2. Go to attrib > attrib > racebps.

    3. Right click on "axis_infantry_company.rgd" and select "Make a copy of this file". Name it: "axis_japan.rgd"

    4. Open up "axis_japan.rgd".

    5. Go to "online_race_id". Change it to a number of your choice. 4 or higher should be good, but there has been reports that 4 isn't working. 0-3 is used by the vanilla factions, in this order: US, Wehr, CW, PE.

    6. Go to "sub_race_type". Change it to "axis_japan".

    7. Go to "race_path". Change these:

    *A) image_flag_filename (flag to show up when selecting the team)
    *B) name_abbreviated (Shorter version of the name, eg Japan instead of Japanese)
    *C) name_id (The name to show when selecting the team)
    *D) path_name (ebps and sbps, recommended is to keep it the same as sub_race_type)

    8. Go to attrib > attrib > ebps. Extract axis folder. Rename the extracted folder to what you selected as path_name in the last step.

    9. Go to attrib > attrib > sbps. Extract axis folder. Rename the extracted folder to what you selected as path_name in step 7.

    10. Go to data > data > scar and open wcutil.scar

    11. Find "_Annihilate["axis"] =" (line 93?) and copy from there down to "-- the Panzer Elite stuff" (not including this).

    12. Paste it below.

    13. Change "_Annihilate["axis"] =" (new one) to "_Annihilate["axis_japan"] =" (or what ever your sub_race_name is)

    14. Go to attrib > attrib > ebps > gameplay

    15. Find "starting_position.rgd" and open it up.

    16. "starting_marker_ext" > "starting_build". Go to building_02 (for allies) or building_05 (for axis).

    17. In "building" enter "ebps\races\'path_name'\buildings\hq.lua", where 'path_name' is the path_name you selected in step 7D.

    18. In "race" enter "racebps\'racebpsnamehere'.lua", where 'racebpsnamehere' is the file name you select in step 3 (without the .rgd).

    19. Repeat steps 14-16 for all starting_position files, including Holland. Please note that the HQ name is slightly different for each HQ.

    20. Place this file in your "Data\art\ui" folder. Make sure you extract it before placing it. More info on what it does and why it's needed can be found here. The file was made by Cope, all credits to him.

    21. Go to data > data > scar and open "luacontansts.scar". After TRACE_AXIS_PANZER_ELITE = "axis_panzer_elite" add TRACE_AXIS_JAPAN = "axis_japan" (should be the same as the racebps name)

    22. Scroll down to line 79 (in 2.601) and copy everything from "--*** AXIS SBPS ***" to "--*** COMMON WEALTH ***" (not including the Commonwealth line). Paste it below and change AXIS to JAPAN (first and second line).

    23. Head to line 340 (in 2.601) and copy everthing from "--*** AXIS EBPS ***" to "--*** COMMON WEALTH ***". Do the same as above.

    24. Head to line 617 (in 2.601) and copy from "AXIS = {" to "ALLIES = {" (don't copy the Allies part including the first line!). Paste it below and do like in step 21.

    25. Since we cannot use the "starting_squads" in "starting_positions", we need to do a walk around. There is one, a smart one invented by someone in the EF team long ago (my guess is Cope, but I'm not sure!). Open data > data > scar > winconditions > "zannihilate.lua". In there add the following AFTER "g_CheckAnnihilate = true" ADD

    PHP Code:
    function OnInit()

        -- 
    this is for spawning the custom startingsquads
        
    for i=1World_GetPlayerCount() do
        
            
    local player World_GetPlayerAt(i)
            
            if 
    Player_GetRaceName(player) == "axis_japan" then
                Util_CreateSquads
    (playerSGroup_CreateIfNotFound("starting_japan_player_"..i), SBP.JAPAN.PIONEERPlayer_GetStartingPosition(player))
            
    end
        end
    end

    Scar_AddInit
    (OnInit
    There you go, your own faction. Now you need to do all changes so it's not a 100% copy of Wehr, have fun

    If it doesn't work, then either you did a mistake somewhere, or I wrote something wrong/missed something (let's hope it's not that!).

    Also please note that you need to update wcutil (if change in buildings) and luaconstants (if change in units, squads or buildings).

    To Fix Recrewing crashes:
    http://forums.relicnews.com/showthre...nd-TeamWeapons
    Last edited by Rizz; 18th Jul 11 at 4:18 PM.
    War... War Never Changes...

  2. Modding Senior Member Company of Heroes Senior Member  #2
    Celéstial by heart Celution's Avatar
    Join Date
    Apr 2008
    Location
    Sweden
    Dude, that is sick man! Thank you very much.

    Will the next part also contain how to get speeches and Victory Point Control working?

  3. #3
    nice one, good to have this all condensed into 1 thread

  4. #4
    Alright, I added the starting squad thing (I know a lot of ppl had problem with it!). Also missed a few things, so new is step 8 and 9.

    @Cele, I guess I can write something on speeches... But I have no idea what you mean with VPC not working. I don't recall any problems with it when we started EF back in '07.

  5. Modding Senior Member Company of Heroes Senior Member  #5
    Celéstial by heart Celution's Avatar
    Join Date
    Apr 2008
    Location
    Sweden
    Oh, i thought a new race could not use VPC, never mind then.

  6. #6
    Rizz- one big thing, update point where change online_id ,4 is somehow occupied and unables to select race

    Second thing-AI don't take control over units in new races

  7. #7
    Changed the part with online_id, about AI, I don't know how the AI system works, hence I don't know how to fix it.

    Btw,

    Would be great if someone did entire this, and tell me if they get any errors or problems.

  8. #8
    Rizz, problem with AI is when player drop from game, all units just stay and doing nothing, another things like AI building units is something what you need to do yourself. Anyway I didn't changed luaconst and new races are working good

  9. Modding Senior Member Company of Heroes Senior Member  #9
    Celéstial by heart Celution's Avatar
    Join Date
    Apr 2008
    Location
    Sweden
    How did EF get the AI working then? Coding a whole new one?

  10. #10
    Banned georider's Avatar
    Join Date
    Oct 2007
    Location
    Thessaloniki , Greece
    How did EF get the AI working then? Coding a whole new one?
    This one is Houdini works

  11. #11
    Member sweeten2213's Avatar
    Join Date
    Aug 2007
    Location
    NJ, USA
    How did EF get the AI working then? Coding a whole new one?
    That would be me (Does that make me Houdini, Geo )

    Yes, I had to add ALL necessary things for the new AI. I would try to explain how, but I would need my own subsection to try The simplest way to describe it is I added the new race and stuff (units, abilities, etc...) to just about every file in the AI folder (obviously where it's needed - not everything in every file)

    BTW - nice tutorial, Rizz. Very detailed
    Last edited by sweeten2213; 23rd Dec 09 at 4:34 AM.
    RIP Loran Korn - a dear friend and as amazing a person as he was talented
    RIP MrScruff - you were a true friend and a true talent
    Normandy 44 : European Theater - Project Leader
    N44 ModDB Site
    N44 : ET Website - N44 XFire Community - N44 Guide
    CoH Mods - Waffen Mod
    Eastern Front - AI Coder/Asst Coder

  12. Technical Help Senior Member  #12
    Great in depth tutorial, moving over to the How To's forum..

  13. #13
    Member eliw00d's Avatar
    Join Date
    Jul 2008
    Location
    USA
    Is there any way to change the music of your new race?

  14. #14
    Member Muad'Dib's Avatar
    Join Date
    Aug 2007
    Location
    Wherever I Lurk

    Question???

    Up to how many factions can be put in? I know that the EF team is putting 2 new factions in (one for each side). Can another 2 factions be put in?

  15. #15
    Shouldn't be a problem, as far as I know, there is no hardcoded limit.

  16. #16
    You can Update step 25 for a FIX by following these steps and have no need for scar(or make an alternative 25a if ppl prefer the scar)

    On every HQ from within ebps\gameplay\hq_1, hq_2 etc. go to "starting_marker_ext" > "starting_squads", and copy a race squadlist that replicates yours and rename it so the paths match your other Race names.

    Then in starting_squads complete the race path again to match, and make sure your starting squads are now linked to your new race epbs.

    All done, now it spawns starting units normally, Cheers..... SirPsycho

  17. #17
    Member Muad'Dib's Avatar
    Join Date
    Aug 2007
    Location
    Wherever I Lurk
    From what I know from the EF site, new factions added cannot re-crew heavy weapons such as AT guns, HMGs and mortars. Its a problem that can only be dealt with on Relic's end where they have to change hard coded stuff for new factions to be able to re-crew. I was wondering if somebody from the community can do this so we don't have to wait if whether or not Relic decides to provide the modding community with fix for this?

  18. Modding Senior Member  #18
    This needs to be changed for every mod as you'd need to add a new field to be read from the RGD file; thus you'd need to extend WW2.dll or write your own DLL for your mod.
    "When life gives you lemons, make lemonade. Then use the profits to buy an assault rifle. See if life makes the same mistake twice."
    When to report?

  19. Modding Senior Member Company of Heroes Senior Member  #19
    Celéstial by heart Celution's Avatar
    Join Date
    Apr 2008
    Location
    Sweden
    So technically it's not possible?

  20. Modding Senior Member  #20
    Well, it is possible but not realistic, at least from my point of view.

  21. Modding Senior Member Company of Heroes Senior Member  #21
    Celéstial by heart Celution's Avatar
    Join Date
    Apr 2008
    Location
    Sweden
    Yea, but how would I make that it's possible for a new army to pick up team weapons?

  22. Modding Senior Member  #22
    Get a good debugger/disassembler (e.g. IDA, I won't post a link to the free version provided by the developer, just google it), then disassemble WW2.dll and try to search for the right pieces of code that you should then try to understand before you start with your modifications. I will not this explain this further here 'cause I'm not sure whether this is still allowed in this forum or not.

    You could also try to write your own Mod-Dll from scratch but don't ask me how to do this, I only know the very basics about these Mod-Dlls.

  23. #23
    Can I ask why it would be illegal to write how to change WW2.dll when it will repair something that relic forgot?

  24. #24
    Member eliw00d's Avatar
    Join Date
    Jul 2008
    Location
    USA
    Because it is Relic's Intellectual Property. And they didn't forget it, they didn't plan on expanding on the game any further than TOV...

  25. #25
    So only legal way, would be to write new dll?

  26. Modding Senior Member  #26
    I think it's totally ok to change it and rename it to YourMod.dll (e.g. I've once fixed the WorldBuilder of DoW2 and Relic was totally ok with me releasing it to the public) -- but that's not the point: Doing these changes is not simple at all and I've only got a mere idea of where I need to change something. This needs research, changing, testing and then more research, more changing and more testing followed by some more research, some more changing and some more testing. Then it might work out. It's just a lot of work that needs an incredible amount of time.

  27. #27
    That's why I was thinking how to solve it, and I think I found something, but only for weapons like MG42 and mortars.

    So, recrewing is 2 phase action
    1)splitting team (those 3 from team)
    2)Taking weapon and making new team
    It's only theory, but why not to try it?
    I thought to make first phase manualy through button, but with my deduction the problem is when MG42 is taken by the team- so to solve would it be possible to make this as slot item weapon with value to drop when all team die? In that way everyone can recapture it.

  28. #28
    Member eliw00d's Avatar
    Join Date
    Jul 2008
    Location
    USA
    Is it possible to set up your mod so that only your attrib archive is read and your custom racebps files are read? I tried copying the default racebps files and renaming them, and then deleting the default ones and running the game - but it crashes before it can even get into the game. Is the game hard-coded to read them? Or is there something else I have to edit? I am trying to run the mod without the vCOH attrib archive.

  29. #29
    5. Go to "online_race_id". Change it to a number of your choice. 4 or higher should be good, but there has been reports that 4 isn't working. 0-3 is used by the vanilla factions, in this order: US, Wehr, CW, PE.
    Question here. Setting it to 2 (replacing Brits) would allow weapons to be recrewable?

  30. Modding Senior Member  #30
    The problem is not related to the online-id; I guess it's more a subrace_type-problem.

  31. #31
    I'm not too informed on these matters yet. A friend and I along with his brother (who is going to school for computer gfx type stuff) have discussed building a new (replacement) faction for the British, though. Something that would be a bit more vCoH in playstyle. I've got a good deal of experience with C/C++ and some RCE (olly, IDA Pro, etc) so this isn't just some clown talk. ;P

    Before we throw ourselves into it though, I'd like to know if it would be possible to ensure it could play by all the rules of vCoH. Would faction replacement (as opposed to addition) help with this recrewing issue? Does anyone know? Is it an open question?

    Drifting off topic here, but is there any thorough documentation of the often somewhat cryptic terminology in Corsix's Mod Studio? Also... (sorry to bomb you with so many questions) it appears his website is gone... I only have v0.5.5... do I really need v0.5.6?

  32. #32
    Member eliw00d's Avatar
    Join Date
    Jul 2008
    Location
    USA
    Faction replacement would work just fine, as you're using existing variables. This only concerns new factions which are built from the ground up.

  33. #33
    Great! That's good to know. So, I could theoretically do something like carbon copy Americans in place of British (so at that point, two choices in game: Americans or Americans :P) and then mod the Americans into what we wanted?

    By the way, for anyone with similar issues finding Corsix's Mod Studio v0.5.6, there's a copy mirrored here: http://www.moddb.com/mods/company-of...-modding-tools

  34. #34
    hmm, concerning recrews, perhaps there could be a SCAR solution? like, giving them an 'invisible' ability which is a default action, is a target action for whatever type recrewed weapons are, then this calls a scarfunction which either a) forces them to mount (probably cause a CTD?) or b) changes the units sub_race on the fly perhaps (or even the entire players, if it is reverted after capture) and then forces capture

  35. Forum Subscriber  #35
    Member rex123210's Avatar
    Join Date
    Feb 2009
    Location
    Taiwan
    good job , you

    UCS creator
    ExtraAbilites Mod
    FreeWeapons Mod (*dead)
    Eastern Front ChineseTrad Translation

  36. #36
    Nice tutorial, Rizz. I'm just having a problem with spawning the starting squad.
    It just doesn't spawn. :P
    I have this written on zannihilate.scar:

    PHP Code:
    g_CheckAnnihilate true

    function OnInit() 

        -- 
    this is for spawning the custom startingsquads 
        
    for i=1World_GetPlayerCount() do 
         
            
    local player World_GetPlayerAt(i
             
            if 
    Player_GetRaceName(player) == "suomi" then 
                Util_CreateSquads
    (playerSGroup_CreateIfNotFound("starting_suomi_player_"..i), SBP.SUOMI.PIONEERPlayer_GetStartingPosition(player)) 
            
    end 
        end 
    end 

    Scar_AddInit
    (OnInit
    So, my faction is called "suomi" and it should be written correctly everywhere that your tutorial says so.
    If you want me to post some other stuff that you need to check out, to solve my problem, just say. Thanks.

    //EDIT: Oh, and btw, what does that ("starting_suomi_player_"..i), define on that piece of code?

    //EDIT2: I realised I was starting the game in victory point control, but that doesn't solve my problem. Now it spawns the pioneer unit, but I still lose the match straight away.
    Last edited by Kalervo666; 9th Feb 10 at 3:01 PM.

  37. #37
    This is awsome man, i didnt know where to start from but u gave me hopes..some questions:

    1) if i fail in any of the steps or something, will i have to reinstall all them game and stuff? or will just have to correct the problem?

    2)After that, from where i start to change the units/buildings/sounds to real make a new faction?

    3)If i want this new mod i will do Work Toghther with Eastern Front Mod, can i make all those steps into the mod files or i make on the game itself? if dont, how i do to make 1-2 new factions to work with EF?

    Sorry for all questions and for my english
    TY

  38. #38
    Are you sure it's not called like "allies_suomi" or "axis_suomi"?

  39. #39
    when i click the sub_race_type, 3 things show: Name, Data Type and Value...
    witch one of the 3 shall i change to axis_japan?
    also when i try to change the value to names of the id_name and short name it wont let me, and also how i will change the flag if i cant find those textures? where they are?
    ty

    "6. Go to "sub_race_type". Change it to "axis_japan".

    7. Go to "race_path". Change these:

    *A) image_flag_filename (flag to show up when selecting the team)
    *B) name_abbreviated (Shorter version of the name, eg Japan instead of Japanese)
    *C) name_id (The name to show when selecting the team)
    *D) path_name (ebps and sbps, recommended is to keep it the same as sub_race_type)"

    But change where man? name, id or value??? :/
    i feel kinda stupied

  40. #40
    Rizz your tutorial is awesome but im shocked that almost anybody dont awnswer me here... i dunno if its my english or im just being ignored...

  41. #41
    8. Go to attrib > attrib > ebps. Extract axis folder. Rename the extracted folder to what you selected as path_name in the last step.
    Should this create a new folder? and if not how do I rename it?

    *on a side note my modstudio won't let me create new UCS files in any of my mods
    how can I fix this?

  42. #42
    yeah that folder is created inside your "mod name" folder, u have to enter and manually rename as far i understand...
    but this doesnt work.. i made all the steps carefully and got no new faction to select

  43. #43
    I'm sure your getting frustrated Gusta' when things dont go right, we all do, but I can assure you as tedious as it may seem, it does work. But these files are very tempermental, meaning it only takes 1 stage or 1 file to be wrong for the entire process not too work alot of the times. There must be something you've overlooked or had trouble finding and skipped possibly, thus causing the end result to be the same. Keep at it though, i'm sure you will finally see the rainbow at the end

  44. #44
    gustavowizard, name_id and name_abbreviated should be UCS values. Sorry for not making it clear.

  45. #45
    I've done all the steps and the faction is there to be selected, though I don't know any UCS codes to give it a name (or how to add an original name), but when I start a game with it, the squad spawns thanks to the scar script, but the game ends about 5 seconds into it.

    I tried adding the squads manually into starting_marker_ext/starting_squads by creating a new child for the new faction and changing the path names and stuff to refer to the new faction but didn't work. Then I tried your script again and it worked, but like I said the game ends in defeat like 5 seconds later.

    Same as Kalervo666 it seems.

    Any ideas?

  46. #46
    Ah, missed a part in the tutorial, do like u did in luaconst.scar with wcutil.scar (same basic concept)

  47. #47
    well i tought it was because only my OF is original so i made all again but using the panzer as a copy instead of the normal werchmat (axis), still didnt worked.. strange..
    i play online so i use version 2.601, i dont know if it counts.. i got over it again and then i opened the EF mod just to see how they did with the soviets, still cant find what im doing wrong, the game launch normal and stuff, i jsut dont see new faction, i changed even the flag to italy but still dont apear..
    i even tried to look for a new-faction-raw-ready module to download but couldnt find it

  48. #48
    hey man i finnaly got the new faction u teach on that tutorial, the problem is after the skirmisher beggins, after 5 seconds the game just end, the "exit scenario box" apears.. do i have to do something extra so it works? its a copy of werhmatch, also my pioneers dont apears, jsut the HQ... any ideas? thank you man
    thanks

  49. #49
    Member huetti07's Avatar
    Join Date
    Jun 2009
    Location
    Austria
    Quote Originally Posted by Rizz
    Ah, missed a part in the tutorial, do like u did in luaconst.scar with wcutil.scar (same basic concept)
    @gustavowizard, maybe this helps, this guy has same problem.

  50. #50
    ok i solved that problem ty gus..
    Last edited by gustavowizard; 5th Mar 10 at 10:35 PM.

Page 1 of 4 1234 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •