安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题








I have a few recommendations for improving the compatibility of your mod. For example, you can use OnPostTemplatesCreated to edit the GenerateRewardFn delegate for the 'Reward_Soldier', 'Reward_Rookie', and 'Reward_CouncilSoldier' templates instead of overriding X2StrategyElement_DefaultRewards. However, since Long War Toolbox overwrites the same delegate, it would also be useful to look into whether it's possible to use the LWTuple system and the events sent by Long War Toolbox instead when Long War Toolbox is being used alongside this mod. Let me know if you want anything I said clarified!
1. Remove the override for X2StrategyElement_DefaultRewards.
2. Add a new X2DownloadableContentInfo class that overrides OnPostTemplatesCreated
3. Makes 3 calls something like:
StratMgr.FindStrategyElementTemplate('Reward_Soldier'').GenerateRewardFn = <my function>
StratMgr.FindStrategyElementTemplate('Reward_Rookie'').GenerateRewardFn = <my function>
StratMgr.FindStrategyElementTemplate('Reward_CouncilSoldier').GenerateRewardFn = <my function>
Several questions:
- to point to my method like that, will my method need to be static? Or will it even take a pointer to a function outside of that class?
- Not familiar with Long War Toolbox, what's a LWTuple?
- If I make it compatible with this Long War mod, will that make it dependent on LongWar's mod being installed first?
- What exactly is a 'Reward_Rookie' and 'Reward_CouncilSoldier'?
- Just curious, are you part of the Long War development team?
2. From the Long War Toolbox description on Nexus:
"Toolbox makes use of a generic LW_Tuple data structure for passing data back and forth using the X2EventManager. If your mod wants to RegisterForEvent for one of these EventIDs, you'll want to include the LW_Tuple package :
1) Copy the LWTuple.uc class file into your mod, in a separate folder under /Src/LW_Tuple/Classes/
2) Add config line "+ModEditPackages=LW_Tuple" (to match the new folder in Src) to XComEngine.ini, section [UnrealEd.EditorEngine]
3) Use the LWTuple class in your code"
I haven't gotten around to learning how to use this myself, so I likely won't be of much more help here.
3. I do know that it will not be dependent on Long War Toolbox loading first (nor will it be dependent on Long War Toolbox at all).
4. 'Reward_Rookie' and the others are the names of X2RewardTemplate instances generated by XCOM 2 every time it loads a game. The important thing for you is that each of them contains a delegate for the function used to generate a soldier reward, which by default points to the function your mod currently overrides.
5. I wish!
[Engine.ScriptPackages]
+NonNativePackages=ResistanceWeaponUpgrades
[Engine.Engine]
-ModClassOverrides=(BaseGameClass="X2StrategyElement_DefaultRewards", ModClass="X2StrategyElement_DefaultRewards_RWU")
Did you at one point have the class overridden, and this is to clean it up out of the INI files?
Also curious if this could be used to blow away other peoples overrides so that your mod will work? ( kind of a dirty thing to do, but hey :) )