雨世界

雨世界

评价数不足
Tactical CPC NPCs (G1/G2/G3)
   
奖励
收藏
已收藏
取消收藏
Creatures
标签: Gameplay, AI, NPC
文件大小
发表于
更新日期
19.977 MB
10 月 11 日 上午 8:52
10 月 13 日 上午 1:37
2 项改动说明 ( 查看 )

订阅以下载
Tactical CPC NPCs (G1/G2/G3)

描述
Generative AI Mod: Tactical CPC Mod
A mod that integrates CPC naming/spawning with a locally running generative AI for patrol, decision-making, and combat.

Why I made this mod
Slugcat sits at the very bottom of the food chain and, aside from the player and slugpups, it’s basically absent as a species—almost endangered. I wanted more of them in the world, so I added additional slug NPCs.

How to start the server
Run start_server.bat inside:
C:\Program Files (x86)\Steam\steamapps\workshop\content\312520\3584980186
If the server shows “ON” like in the screenshot, it succeeded.

Controls (extra features)

Press Numpad Enter to start recording the player’s actions (no noticeable frame drops).

Press Numpad + to let the AI auto-control your character (still rough).

Press Numpad 0/1/2/3 to spawn CPCs for each faction (factioning isn’t fully set up yet).

Original plan & current limitation
I originally used the phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4 model to build a self-learning mod.
But my gameplay skills are limited, and my coding time is constrained because I’m preparing for the Electrical Engineer practical exam.
I plan to update this later. Right now it runs only with an MLP; using an LLM for strategy/planning isn’t available.

Ultimate Goal

An AlphaStar-like generative-AI CPC.

Implemented

Improved CPC combat AI (initial AI uses the ArenaPlus AI model).

Added lots of action features so CPC can imitate player behavior (this is where my lack of gameplay skill shows).
Below is what gets trained:

Action set

ACTS = ["MoveX", "MoveY", "Jump", "Throw", "Pickup", "Map", "Grab", "Swallow"]


Feature set

FEATS = [
# Base 12 + 4 weapon + 4 enemy-type + 2 enemy-velocity + 2 lead-shot + 1 distance ring
"hasWeapon",
"enemyVisible",
"distanceNearest",
"hpRatio",
"vx",
"vy",
"posX",
"posY",
"enemy_dx",
"enemy_dy",
"onGround",
"isClimbingOrPipe",

# Weapon info (4)
"weaponVisible",
"distNearestWeapon",
"weapon_dx",
"weapon_dy",

# Enemy type info (4)
"enemy_is_scavenger",
"enemy_is_lizard",
"enemy_is_elite",
"enemy_count",

# Enemy velocity (2)
"enemy_vx",
"enemy_vy",

# Lead-shot hints (2)
"pred_dx",
"pred_dy",

# Distance ring (1)
"dist_ring",
]


Scavenger spawns so they and CPC slugcats can fight each other.

Names above CPCs and Scavengers (toward “named” units; partially works). Final aim: if you drop in a custom slugcat JSON and sprite atlas, it should render. Special skills are hard, but something like an Artificer-style jump should be possible.

Random CPC spawns across the world map.

CPC is a separate NPC from slugpup.

Not Yet Implemented

Faction setup — not sure which approach will actually work; I keep failing.

CPC obstacle traversal at player level — likely needs referencing all images and TXT files under
C:\Program Files (x86)\Steam\steamapps\common\Rain World\RainWorld_Data\StreamingAssets\world
which I don’t have time for right now.

Spawning with weapons — keeps erroring; reason unknown.

Fully realized named CPC characters.

Boss monster and boss respawn after a threshold of deaths (I made the pixel art, but detailed behavior is hard).

Stronger CPC AI — planning continuous updates.

Art note
The images were generated by AI and then retouched by me.
20 条留言
ERROR2401 10 月 18 日 下午 3:17 
@sapphie
Maybe having an alternate startserver.bat that's for the steam deck file locations (and a small tutorial to run the .bat) could work?
Sapphie 10 月 18 日 下午 1:27 
i beleive the entire mod expects the user to have rainworld stored on the C drive
ERROR2401 10 月 17 日 上午 11:22 
Although, I feel like this may not work on linux in general if the start_server.bat file mentioned in the description is required
ERROR2401 10 月 17 日 上午 10:56 
I will say that with the mod active on steam deck, it seemed numpad enter had the mod control the player slugcat, although it mostly just jumped repeatedly going back and forth around center... third? of the room when I used it in arena mode.
URL  [作者] 10 月 15 日 下午 6:09 
@ERROR2401 I don't know....
ERROR2401 10 月 15 日 上午 11:27 
does this work on steam deck?
IamMael 10 月 14 日 上午 11:47 
oh, i see
URL  [作者] 10 月 14 日 上午 10:37 
Running this mode without a server can cause a frame drop. (Even though I supplemented the code, I still see a slight frame drop. It will be fixed later.)
URL  [作者] 10 月 14 日 上午 10:37 
@IamMael
This is not a multiplayer mode.
It may be compatible with multi (but I haven't checked it yet)
Turning on the server in this mode
I'm just trying to make local AI work.
Press keypod + and CPC will control the character (with the mlp I set)
Press the keypad input to record the action.
IamMael 10 月 14 日 上午 8:09 
Also it seems the mod causes the game to freeze after hibernating and pressing continue.