- 好友
- 1
- 在线时间
- 0 小时
- 最后登录
- 2026-2-1
随仆

- UID
- 3840361
- 第纳尔
- 0
- 精华
- 0
- 互助
- 0
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 0
- 注册时间
- 2026-1-13
 鲜花( 0)  鸡蛋( 0)
|
发表于 2026-1-14 14:23:05
|
显示全部楼层
Thinking about this later, I realized the correct words were "Lua LANES" for the "run a thread tied to a specific CPU core" for Warband.
Lua Lanes DOES have support in WSE2, although the Lua implementation does NOT offer the full Lua libraries needed to perform all Lua commands.
This means it may be difficult or impossible to know enough about the runtime environment or hardware to correctly assign a thread to a processor core, just as I can write a text file and read it back, but only at a single directory tree and only if I know the filename in advance. I cannot in Warband's WSE2 Lua even search a directory or leave the workspace lua allows for reading or writing, nor read or write in binary mode for file access.
Another aspect is a lua lane takes a relatively long time to load and is better used for very CPU intensive long tasks, rather than small/short tasks.
Finally, when deciding how many lua lanes can or should be running at once, remember that the player could be running something besides Warband, such as Open Broadcast Software or another streaming software to broadcast to file their game session, so besides Windows background tasks plus Warband engine plus any postFX frame processing there may be other software using CPU resources at that instant.
If those are the obstacles to a modder, where is the biggest benefit to remaking/rewriting mods?
I believe the biggest and least attempted is exactly coop, especially a coop based on single player mode play as opposed to the current multiplayer server-client method. Single player to coop currently uses "battle time" kit but single player mode mods do not handle multiple enterprises at a town, or multiple players (thus cannot assume trp_player == troop ID 0). Some of the troop identities must change to virtual players or the mod completely rewritten to allow a v_player to sit anywhere in the range of heroes rather than assumed to be at troop ID 0.
For a single player mode mod to be rewritten as I intend, the entire mod needs to be torn up and remade, as any test that assumes the player is troop ID 0 will always fail for "limited multiplayer". At parties, support for multiple enterprises implies changes to defined slots storing enterprise, infrastructure such as manor or school or other improvements (why not monastery? hospital? temple?) so that more than one player can own these at the same town. But most of all, synchronizing every random dice roll is a CPU expensive activity, when not coming from a server but instead rolled locally. This is because even a simple check to hit, once for example a projectile in flight is found to intersect an agent in battle, involves a hidden random roll which may not use the same pseudo-random numbers you and the other coop nodes expect, so every such function has to be explicitly performed either in lua or a mix of warband script-and-lua so that the check performed locally at user A is the same result as seen locally at user B, assuming no network bandwidth is wasted sending results from node to node. The only thing I want to see sent was the seed value for the psuedo-random number generator, and any general commands to a team, and the one and only player's changes, all else to be done locally as if a single player game, at each node in the coop.
This to me is the high frontier. Nobody has done it successfully in Warband. I mean - noone at all. I don't believe in impossible half so much as "it is very hard, so people stopped trying". Impossible tells me I should look outside the box and find a new method.
Well, I guess I get neither a like nor a follow nor even any respect for mods I worked on, since any moron can claim to be some has-been coder. I don't even know this site checked my credentials. You could see my posts at Taleworlds forum, looking up "gsanders", but I am not the top person nor the best modder. I am old, sick, and tired, but I really want to make a mod to do these things. I just realized I need to do it in steps, layer by layer, and plan 4-5 stages to get there, while I am still at the start of stage II and thus have very little to show that seems "wow". But in my opinion, China has the fresh young and hungry potential, plus a little more polite people, than in Europe (where I have a lower reputation to be honest). Maybe this is the best reason for coming here.
Sorry about all the English. I am sure google will butcher this, in either direction, but it is all I have. At least I have been embedding my source code in my last mods, and I think some newer mods here already use (some of) it. Once more thanks for your time.
- GS |
|