Login

russian armor

*To all modders* Migrating mods to post-WBP

22 Mar 2017, 15:15 PM
#1
avatar of Mr.Smith

Posts: 2636 | Subs: 17

Greetings fellow modders :)

As one of the creators of the WBP mod, and also a ranking member of the coh2.org staff of these parts of these forums, I would like to make the transitioning into the post-WBP world easier for everyone.

Therefore, I am creating this thread to issue both a warning about potential issues to come, and also some practical advice about how to overcome those issues.

To eliminate the possibility of human error in the integration process (i.e., transfering WBP files to the live game), we, with the help of Relic had to design an automated procedure that translates mod-files into game-files. As a result of this, and according to what our beta-tests indicates, the integration was flawless.

Unfortunately, due to the particular process we followed that might be some potential conflicts with the modding tools. Unfortunately, it was not possible for us to doublecheck this possibility. However, it is better to be safe than sorry.

What you, as mod-maintainers should do:

1. (if necessary) Survey the source files of WBP to discover bugfixes and changes that might potentially compromise your mod. You can access the files here: https://www.coh2.org/topic/59386/wbp-source-files
2. Create a backup of the "instances" folder of your mod. If you use version control, you're good.
3. If your mod starts acting weird, and only after you have completed step #2, you could try recompiling your mod (mod -> clean -> rebuild)
4. If your mod still doesn't work, report back to the threat here.


The reason why we are issuing this warning is because:
- The gamefiles will be using the pbgid's (unique identifiers) that were created by the mod-tools when were creating the mod.
- It is highly likely that your mods also used the same pbgid "address space" as the WBP (since we all use the same tools)
- pbgid's need to be unique. Otherwise, if there is a conflict, your mod file "overwrite" a newly-created WBP file (or vice versa)
- We don't know how the mod tools will react if/when they discover a conflict between pbgid's

Thus, if your mod appears broken after the patch (and the tools) become updated, you do not need to despair. If you've followed steps 1-4 correctly and your mod still doesn't work, contact us in this thread.


If necessary, we will provide you with a tool that rewrites your mod's pbgid's so that there is no conflict between your mod and the post-WBP live version.


Just remember to create a backup of your "instances" folder, and happy modding!
22 Mar 2017, 21:11 PM
#2
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

I didn't test it yet, but does this mean that the rebuild action solves the duplicate pbgid's? I thought that these id's are fixed when the files are created.
23 Mar 2017, 00:54 AM
#3
avatar of Mr.Smith

Posts: 2636 | Subs: 17

The thing is, that to port the changes we didn't create the files using the mod tools. Instead, we took the files from the mod, and used whichever IDs were assigned by my mod tools.

The situation I dread is as follows.

- Say, concurrent with the WBP somebody started creating their mod.
- When I created the first new file for the mod (say, penal PTRS), the attribute editor gave that file ID 10000.
- At the same moment, when the other modder created the first file for their mod (say, rocket launcher), that file also got file ID 10000.

This is OK, as two mods are normally never designed to play well with each other.

However, what I fear will happen is that the overlap in IDs might make live-version upgrades that give PTRS to interfere with the mod and give rocket launchers in the mod version, instead.

I have already experienced something like this during a failed clone when a newly-created file (ghost retreat points) had the same pbgid as a pre-existing file (major's retreat antenna). This was the reason why retreat point functionality was bugged in WBP v1.3 (it's not because I touched Major retreat point; it's because something else clashed with it).

I suspect that if somebody starts their mod after the patch hits, the tools will detect a clash and fix it automatically. I'm just not 100% sure what the outcome is going to look like for pre-existing mods that happened to use the same IDs as the new game-files for other mod-specific files.
26 Mar 2017, 20:15 PM
#4
avatar of Olhausen
Modmaker Badge

Posts: 245

Hi Mr Smith:

First than nothing thank you very much for your support.
Personally talking, our team always work with github but we are preparing us to the next patch.
We already did back ups of the mod and I stoped modding waiting for relic update.

I really hope to not have big issues with it but most of the times relic patch break the mods sadly.

Regards
Olhausen
29 Mar 2017, 05:00 AM
#5
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

All mods seem to have trouble. I discovered that the abilities with the same ID's as the new files don't work. I tried a rebuild, but that didn't change anything. The tools didn't gave me any warnings while building. I think the best solution is to manually (or use a script to) edit all ID's within the mods and increase them to a unique value. And yes, I've backup everything ;).
29 Mar 2017, 05:18 AM
#6
avatar of kwok

Posts: 60

How do you manually edit the ID's? Is this something that can be done within the attribute editor?
29 Mar 2017, 06:43 AM
#7
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

No, it can't be changed in the official tools. But it's just XML which can be edited in every text-editor.
29 Mar 2017, 10:37 AM
#8
avatar of Mr.Smith

Posts: 2636 | Subs: 17

I had issues with the abilities, until I manually changed the ID of my abilty to a random value. Then, when I created a second ability, it automatically picked up a consecutive ID. Thus, I was safe.

So, is this just for the abilities? I also created an ebps projectile for my mod, and it seemed to work properly.
29 Mar 2017, 10:48 AM
#9
avatar of Olhausen
Modmaker Badge

Posts: 245

I confirm, the change of this value do the ability, upgrade etc works again:

<uniqueid name="pbgid" value="1073742043"/>
</instance>

I am working on my mod now, but dont know how this change affect the rest of the mod. Need to test it more.
29 Mar 2017, 11:08 AM
#10
avatar of Mr.Smith

Posts: 2636 | Subs: 17

I don't know if there's something that Relic can do to fix the tools.

However, I will try to work a solution with them to change the ID's of the newly created files, so that there are no more conflicts.

This might take a while, though. In the meantime try to make do with manual ID switching until somebody can conjure an automated script.
29 Mar 2017, 16:03 PM
#11
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

I've made a list of all ID's of the created files in the WBP Update.
I hope this helps to find your own files with the same ID's!

Instances\abilities:

Instances\ebps:

Instances\slot_item:

Instances\upgrade:

Instances\weapon:
29 Mar 2017, 16:06 PM
#12
avatar of Mr.Smith

Posts: 2636 | Subs: 17

Good work, SneakEye.

Now, if relic were to change the IDs of the offending files (both for the live game and the mod tools), do you think that would be enough to fix the problem?

Relic could, for instance, remove the two most significant digits for the offendings IDs (i.e., "1073741823" becomes "73741823". That way, new files no longer cause collisions with custom-mod files.

Do you think this would work?
29 Mar 2017, 16:08 PM
#13
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

Yes! I'm very certain that would work. I'm changing my files atm, and it seems to fix everything.
29 Mar 2017, 16:10 PM
#14
avatar of Mr.Smith

Posts: 2636 | Subs: 17

Yes! I'm very certain that would work. I'm changing my files atm, and it seems to fix everything.


What I'm saying is:
- Instead of having *every* modder change their the ID of their files
- Relic could change the IDs of the files we gave them

Btw. I have also noticed that actions (e.g., requirement actions) have IDs of their own. Do you think there is -any- chance that duplicate action IDs could break the game?
29 Mar 2017, 16:41 PM
#15
avatar of SneakEye
Senior Modmaker Badge

Posts: 817 | Subs: 5

I understand that and think that's the best solution. I just want to fix my mod asap so I continue with editing ID's ;)

I haven't found any issues due the action-ID's, but I need to test that some more to be sure.
29 Mar 2017, 17:03 PM
#16
avatar of Mr.Smith

Posts: 2636 | Subs: 17

How about this:
- I tell Relic to remove the first two digits from newly created files
- Modders, in the meantime, introduce 1 digit to conflicting files

That way:
- You can already modify your mods so that they continue working
- When Relic implements the fix, your mods will continue working

Or, for the lazy (but patient):
- Even if you don't modify your mods, they will be able to work when Relic implements the fix

Thus, if your file has ID "1073741823", convert it to "11073741823" (I added a leading 1)

Can somebody confirm whether this solution would work? (i.e., is the ID too long or not?)
29 Mar 2017, 21:44 PM
#17
avatar of Mr.Smith

Posts: 2636 | Subs: 17

There will be a hotfix coming, very likely this week, that will address the ability ID/etc issue. Essentially we will be removing the first 4 digits off the newly-added (and conflicting) ability IDs.

In the meantime just add 1,000,000 to your mod IDs, if you can't wait until then. In that case:

1073741823 becomes 1074741823
29 Mar 2017, 21:52 PM
#18
avatar of Olhausen
Modmaker Badge

Posts: 245

Yes, I can confirm that. I added a "1" and the mod started to working fine.
I am doing that with my mod to solve the problems.

Thanks a lot for the support.
29 Mar 2017, 22:19 PM
#19
avatar of Mr.Smith

Posts: 2636 | Subs: 17

Just to verify. Do you guys thing it is OK that certain newly-actions have high action-IDs?
29 Mar 2017, 23:06 PM
#20
avatar of Olhausen
Modmaker Badge

Posts: 245

Another feedback from my modding:

Adding an extra number in the "pbgid" number generate me problems. When mod tool is loading validating problem appear and said me too much characters.
Then some things works fine and others not.

I am doing it more simple, I am changing the 107...to 117... for now is working fine. I will post here more feedbacks when finish my fixing.

Regards
Olhausen
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

844 users are online: 844 guests
2 posts in the last 24h
8 posts in the last week
39 posts in the last month
Registered members: 49079
Welcome our newest member, Rodfg15
Most online: 2043 users on 29 Oct 2023, 01:04 AM