ineedbots / iw4_bot_warfare

The Bot Warfare mod for MW2
https://www.moddb.com/mods/bot-warfare
97 stars 24 forks source link

What is the process to modify the mod? #69

Closed PanzerFowst closed 4 months ago

PanzerFowst commented 5 months ago

Summary:

Probably a dumb question, but I created a fork of this repo so that I could have fun modifying some of the bot chatter or the bot names, but I don't know how to correctly modify the files it seems? Whenever I launch a dedicated server running the mod with my changes, the bots fail to load. I can't see any error messages or anything crashing, so I am kinda confused.

Is it possible for someone to just open the z_svr_bots.iwd file, make some changes, put it back, and run the mod again?

Stuff I did:

I realized a little bit ago that if I renamed the .iwd file to a .zip and extracted it, I could see all the source code and go in and modify things. Well, I did that in the _bot_chat.gsc file and then I zipped everything back up and tried to put it back how I found it, but I can't seem to get that to work.

I even tried just unzipping and then zipping the z_svr_bots file back up and change the extension back to .iwd, but even that would result in the mod not working. Am I just missing something in the way you package the mod?

PanzerFowst commented 5 months ago

I also want to add that I cannot thank you, @ineedbots enough for this mod!

My family/friends and I have had a lot of fun playing IW4x together with LAN parties, but this mod made it way more enjoyable instead of matches being 2v3 or maybe 3v3 if we got lucky. This mod was perfect for us and really just is so nice to have a full lobby of only people we know without having to go searching for random online lobbies.

My hope is that I can change up some of the bot messages to throw in some inside jokes, but even if I can't, we still love and will use the mod regardless! =)

ineedbots commented 5 months ago

It looks like you have the right idea, just open the .iwd (its just a zip file) with a zip unachiver, make changes to the .gsc files, and save the archive (make suure it still ends with .iwd)

PanzerFowst commented 5 months ago

I feel like I've done that, but maybe not correctly? Here's what I do:

  1. Rename extension from .iwd to .zip.
  2. Right-click in Windows Explorer and click Extract All... and extract the contents to my Downloads folder since I can't extract inside the Program Files (x86) folder.
  3. Open the extracted folder, navigate to the .gsc file with the bot chat strings and modify only the strings.
  4. Save the files.
  5. Right click the folder z_srv_bots folder and go to Send toCompressed (zipped) folder.
  6. Rename the extension from .zip to .iwd.
  7. Place the new .iwd folder into the same location I got it from (I keep the original .iwd file in the same location but renamed to z_srv_bots-old.zip.).
  8. It looks like this: image

But the bots don't load when I load the LAN server.

I have done the exact same thing where I didn't change and of the code (so omitting steps 3 and 4), and the same thing happens. Is that normal?

PanzerFowst commented 5 months ago

It seems I am getting this error whenever I launch with a modified .iwd file...

[error 2147942402 (0x80070002) when launching `iw4x.exe  -dedicated +set fs_game "mods/mp_bots" +set sv_lanonly "1" +set net_port "33111" +exec BOTWAREFARE.cfg +set party_enable "0" +map_rotate']

image

iYawnz commented 5 months ago

To modify bot names all u have to do is adding a bots.txt file in the z_svr_bots.iwd "zip" file. To open it you can use anything like WinRar. open the txt time and add names from top to bottom each new name under eachother and to add clantags to them do TheirName,Clantag. To edit anything related to chatter there is a file in z_svr_bots.iwd: maps\mp\bots named _bot_chat.gsc. You can edit there some lines that are already existent. Hope that helps

PanzerFowst commented 4 months ago

Hmmmm... Maybe I'll try WinRar instead of just the normal File Explorer because at this rate, I'm not sure what it is?

iYawnz commented 4 months ago

Hmmmm... Maybe I'll try WinRar instead of just the normal File Explorer because at this rate, I'm not sure what it is?

Yes, use Winrar and make the .iwd files being opened by Winrar as default. I do this all the time works perfectly fine

PanzerFowst commented 4 months ago

Alrighty, I moved my .iwd file to my Downloads directory, renamed the file to .zip, used WinRar to Extract the folder, made no modifications, used WinRar to create .zip by clicking z_svr_bots folder and clicking Add and then ZIP as Archive format and then OK, and then renamed file to .iwd, put it back in my mods folder and the script is still broken.

Looks like it is failing on the scripts/_aimassist::init function...

Original .iwd file: image

WinRar unzipped and zipped again .iwd file: image

iYawnz commented 4 months ago

Alrighty, I moved my .iwd file to my Downloads directory, renamed the file to .zip, used WinRar to Extract the folder, made no modifications, used WinRar to create .zip by clicking z_svr_bots folder and clicking Add and then ZIP as Archive format and then OK, and then renamed file to .iwd, put it back in my mods folder and the script is still broken.

Looks like it is failing on the scripts/_aimassist::init function...

Original .iwd file: image

WinRar unzipped and zipped again .iwd file: image

No i did not say renaming the file extention. Just open the .iwd with winrar. If it runs fine but after you have changed some code it stops working then that is a code issue

PanzerFowst commented 4 months ago

Uhmmmmmm... Well, that seemed to work... Thanks, @iYawnz!!!

image

image

image

Now the obvious question: Why does this work this way? How does does ineedbots do releases then?? I think I can work with this in my own repo, but it'll be a BIT weird. xD

ineedbots commented 4 months ago

iwds are literally just zip files, just renamed