Rain World

Rain World

Not enough ratings
Generative AI Mod: Tactical CPC Mod / 생성형 ai 모드 Tactical CPC 모드
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
19.893 MB
11 Oct @ 8:52am
1 Change Note ( view )

Subscribe to download
Generative AI Mod: Tactical CPC Mod / 생성형 ai 모드 Tactical CPC 모드

Description
CPC 네임드/스폰, 생성형 로컬 AI 순찰/결정/전투 연동하는 모드


이 모드를 만든 이유: 슬러그캣은 먹이사슬 최하위의 피식자인데 멸종위기종인지 플레이어와 slugpup을 제외하고는 없다. 그래서 더 추가하고 싶었고 그래서 다른slugnpc를 추가한것

C:\Program Files (x86)\Steam\steamapps\workshop\content\312520\3584980186 안의 start_server.bat을 실행하여 서버를 on 사진 처럼 나오면 성공

추가적으로 키패드의 엔터를 누르면 플레이어의 행동이 녹음되기 시작함(딱히 프레임 드랍없음)
키패트 플러스를 누르면 ai가 너의 캐릭터를 자동 조종(아직 허접함)
키패트 0,1,2,3 은 각 진영의 cpc를 스폰(하지만 아직 진영이 제대로 설정이 안되어있다.)

원래는 phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4 모델을 사용 스스로 성장하는 모드를 만드려 했으나

내가 게임 실력이 부족하고

코딩실력이 부족함 + 전기기사 실기 준비로 인해

추후 더 업데이트 할 예정(현재는 Mlp로만 작동, LLM으로 전략 세우기 불가능)

최종목표

알파 스타같은 생성형 ai cpc

구현된것

1. Cpc의 전투 Ai 향상(초기 ai는 arenaplus ai 모델 사용)
2. Cpc가 플레이어의 행동을 모방할수있게 액션 피트를 엄청 추가함(여기서 내 게임 실력 부족을 느낌)
아래는 어떤 부분이 교육되는지에 대한것
기본 플레이어 움직임 피트 숫자+액션 숫자
ACTS = ["MoveX", "MoveY", "Jump", "Throw", "Pickup", "Map", "Grab", "Swallow"]
FEATS =
# 기본 12개 + 무기 4개 + 적타입 4개 + 적속도 2개 + 리드샷 2개 + 거리링 1개
"hasWeapon",
"enemyVisible",
"distanceNearest",
"hpRatio",
"vx",
"vy",
"posX",
"posY",
"enemy_dx",
"enemy_dy",
"onGround",
"isClimbingOrPipe",
# 무기 정보 4개
"weaponVisible",
"distNearestWeapon",
"weapon_dx",
"weapon_dy",
# ⭐ 적 타입 정보 4개
"enemy_is_scavenger",
"enemy_is_lizard",
"enemy_is_elite",
"enemy_count",
# ⭐ 적 속도 2개
"enemy_vx",
"enemy_vy",
# ⭐ 리드샷 힌트 2개
"pred_dx",
"pred_dy",
# ⭐ 거리 링 1개
"dist_ring",
3. 스캐빈저 스폰, cpc slugcat이랑 서로 싸우게 하려고 스폰되게함
4. cpc와 스캐빈저 머리위에 이름 부여(이것으로 네임드화예정 어느정도 되긴함 이부분 최종목표는 커스텀 slugcat json와 atlas 을 넣으면 출력되게가 목표 특수스킬은 못하겠지만 아티피셔 점프정도는 가능)
5. cpc의 월드맵 랜덤스폰
6. slugpup과 별도의 npc로 만듬

구현 아직 안된것

1. 진영설정 이거 어떤방식으로 해야 먹히는지 모르겠다. 계속 실패함
2. cpc의 장애물 통과가 플레이어 수준으로 올라오게하기(C:\Program Files (x86)\Steam\steamapps\common\Rain World\RainWorld_Data\StreamingAssets\world 여기있는 모든 이미지와 txt를 참고하게 해야할뜻 그래서 시간이 없음)
3. 무기들고 스폰(계속 오류남 이유모르겠음)
4. 완전한 cpc 네임드 캐릭터 추가
5. 보스몹 및 일정 이상 죽으면 보스몹 리젠되게 하는것(도트 파일까지는 만들었는데 세부적인 움직임 구현이 어려움)
6. 조금 더 강력한 Cpc ai 구현(이건 계속 업데이트할뜻)

그림은 내가 ai에게 그림 받고나서 리터칭한것


---------------------------------------------------------------------------------------------------------------------------------------------------

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.
2 Comments
URL  [author] 13 hours ago 
Sorry i don't English well
Adhan 21 hours ago 
Uhh, so this mod is new custom ai for slugcats npc that is not slugpup and can mimic your movement? Seems interesting, if you make the description to English I'm sure it will peek lot of new viewer