Company of Heroes 2

Company of Heroes 2

All Units (170 added)
Trigg 2023 年 3 月 9 日 上午 3:28
detecting units with a game mode script
@SneakEye -

I'm trying to fix a problem with using this mod with my Infantry Spectrum Game Modes. My script doesn't automatically pick up the German scout car and Brumbaer, and I can't detect them at all if I try to load them with ad hoc code. The script barfs on this:

local bp = BP_GetEntityBlueprint(allUnitsModPrefix.."brummbar_sturmpanzer_iv_mp")

The mod is already detected when that line tries to execute, and the prefix is correct because I can load other ebps from the mod - just not the ones for the two vehicles I mentioned.

I got the ebp name by extracting the mod. Do you know of anything special about those two vehicles that would keep this from working?
< >
正在显示第 1 - 8 条,共 8 条留言
SneakEye  [开发者] 2023 年 3 月 9 日 上午 3:47 
I see both units got an new name, while keeping the vanilla pbgid. This is something I would prevent nowadays, but probably did this due to path length issue I got a long time ago.

The names and ids are as following:
ebps\races\german\vehicles\armored_car_sdkfz_222\armored_car_mp
pbgid: 1564
ebps\races\german\vehicles\brummbar_sturmpanzer_iv_sdkfz_166\brummbar_sturmpanzer_iv_mp
pbgid: 1566

Hopefully this info can help.

SCAR is new for me, so I have no idea how that function searches for the file. Though should there be two dots between the prefix and name?
Trigg 2023 年 3 月 9 日 上午 4:01 
Thanks - I'll give it a try in a minute.

The two dots are scar's/lua's unusual way of concatenating strings. The prefix is the tuning pack's mod ID followed by a colon, to tell the script to grab the ebp from the mod rather than vanilla.
Trigg 2023 年 3 月 9 日 上午 4:20 
FYI, still doesn't work. I'll try again when I've been away from it for a while.
SneakEye  [开发者] 2023 年 8 月 20 日 下午 9:52 
Hey, I managed to fix it! Recreating both the 221 and Brummbär entities with their original name and id did the trick, no idea why though. I tested before and after with Infantry Emphasis Game Mode. Apologies that it took so long, I forgot about this issue when working on the previous update. Also I noticed that your mod affected custom units from this mod, very nicely done!
Trigg 2023 年 8 月 22 日 上午 11:52 
Ah, great. Thanks, SneakEye.

IIRC a player asked for compatibility, so I'll track down his post and relay the good news.

Are you working on anything new? Have you switched to CoH3 yet?
SneakEye  [开发者] 2023 年 8 月 22 日 下午 10:02 
CoH3 did not meet my expectations sadly. I'm still keeping an eye on it, but don't see enough progression yet. At the moment I am not working on anything.
Trigg 2023 年 8 月 22 日 下午 10:25 
I'm waiting too. I never pay full price for a game anymore because I've been disappointed too many times. Also, it still doesn't hae enough modability to suit me.

I'm still plodding away on my Late 1944 tuning pack. I've also taken a detour through skins, learning how to add more details.
SneakEye  [开发者] 2023 年 8 月 23 日 上午 8:13 
It is nice to see the CoH2 modding community staying active!
< >
正在显示第 1 - 8 条,共 8 条留言
每页显示数: 1530 50