1.16.1 · Index · Add Address · Statistics · Reference · About

 ?  Address 0x00582144
 ?  Player ID -8328 (Byte Offset: 00)
 ?  Version 1.16.1
 ?  Name Zerg Control Available :: 异虫可用人口
 ?  Size 4
 ?  Length 12
 ?  SC:Remaster Simple Data
 ?  Description % 4 bytes per player Despite being 4 bytes, the game will only display it as uint16 and will wrap around after 65536. usage :: 内存用法(**up :: 22-11-19**) ```C Memory(0x00582144 + PlayerID * 4) EPD(-8328 + PlayerID, Modify, Value) setMemory(0x00582144 + PlayerID * 4, Modify, n * 2) /* 1 game display pop is 2 et facto * * Because Zergling or Scourage just need a half of supply, so n * 2 */ ``` 1 pop is 2 at fact. Because Zergling or Scourage just need a half of supply. So, 200 pop at game is 400 at memory data. 1 人口在数据上其实是 2,比如小狗和自杀机只占用半个人口。 所以,游戏中 200 人口在内存中的数据是 400。 i.e. 300 Protoss supply available for Player 8. :: 给玩家8 设定 300 神族可用人口 ```C setMemory(0x00582144 + 7 * 4, Set To, 300 * 2) ``` Also, can use array, then setting races > players > pop in one way 你可以把这些作为一个数组,同时操作三族、12名的人口数据 ```C BYTE4 [3][3][12] *pop = 0x00582144 BYTE4 pop[3][3][12] BYTE4 pop[Race][Type][PlayerID] ``` And hard coding :: 你也可以硬编码 ```C Memory(0x00582144 + Race * 144 + Type * 48 + PlayerID * 4, Modify, Value) /* or */ Memory(0x00582144 + ((Race * 3 + Type)*12 + PlayerID) * 4, Modify, Value) ``` where Type is - 0 is supply available :: 可用人口 - 1 is its used :: 已用人口 - 2 is its max :: 人口上限 where Race is - 0 : Zerg :: 异虫 - 1 : Terran :: 人类 - 2 : Protoss :: 星灵 i.e. 65535 Protoss pop max for Player 5, and 1919 available protoss supply % 例如,给玩家5 设定114514 神族人口上限,1919个可用神族人口 ```C SetMemory(0x00582144 + 2*144 + 2*48 + 4*4, SetTo, 114514 * 2) SetMemory(0x00582144 + 0*144 + 2*48 + 4*4, SetTo, 1919 * 2) ``` Also by Array :: 数组也可 ```C AVAILABLE = 0 USED = 1 POPMAX = 2 ZERG = 0 TERRAN = 1 PROTOSS = 2 pop[POPMAX][PROTOSS][4] = 114514 pop[AVAILABLE][PROTOSS][4] = 1919 ```
Edit
Links: full · short · direct