Topic: Is it possible to change AI firing accuracy in the new version?
As the title says, but if it's not possible, I remember someone telling me I can do the change if I use the source code or something....can anyone confirm?
Like RTCW Single Player but together ! | Currently there is nobody on 7 available servers. (While there are 3 private servers running)
You are not logged in. Please login or register.
As the title says, but if it's not possible, I remember someone telling me I can do the change if I use the source code or something....can anyone confirm?
it's possible by editing the ai files, they are located in sp_pak_coop1.pk3 in the folder maps/
each map has its own file, example: escape1.coop.ai in that file search for aim_accuracy, you'll have to change it for each AI and then save the file and create a new pk3 file
No no I know I can change the accuracy there, but that doesn't change much since the AI accuracy in RTCW coop is inherently much higher than in the base game
What I meant is can I lower the AI accuracy to the point that it's the exact same accuracy in the original game?
As I said I remember asking you about that years ago and you told me I need the source code for RTCW Coop in order to make the AI as inaccurate as it was in the original game
I did try changing those from 0.6 to like 0.01 but the soldiers remained super accurate with their shots
Now that I think about it, what even is the point of those values being there if the game will always overwrite them anyway?
Developer purposes maybe, it surely isn't there for decoration.
I did try changing those from 0.6 to like 0.01 but the soldiers remained super accurate with their shots
Now that I think about it, what even is the point of those values being there if the game will always overwrite them anyway?
did you pack your changes into a pk3 file ? if not, did you run an unpure server ?
orwa96 wrote:I did try changing those from 0.6 to like 0.01 but the soldiers remained super accurate with their shots
Now that I think about it, what even is the point of those values being there if the game will always overwrite them anyway?
did you pack your changes into a pk3 file ? if not, did you run an unpure server ?
None of that works, you yourself said it years ago when I asked about it (and admittedly was a bit rude about it back then) that the only way to change the accuracy of soldiers in this mod is to recompile the entire code for the thing
So yes I did try doing all of that, and it didn't work because it's clearly all being overwritten by something else
I'll quote what you said to me years ago about this same topic:
"the accuracy is ignored in the ai files, ai get more accurate when g_gameskills is set higher"
"you want to change it ? edit the source code and compile it yourself"
But since you're the one who did the coding, did you change it since then, so that we can change the accuracy without having to recompile?
Edit: I followed the "How to build" file you included in the code files, and I did reach the point of building everything (after removing the bloc from the AI file that forces the accuracy to overwrite existing values)
I reached the point of creating the pk3 file, but every time I type "./create_pk3.bat" into Cygwin, I get the following:
"C:\cygwin64\home\ORWA\rtcwcoop>cd media\sp_pak_coop1\
C:\cygwin64\home\ORWA\rtcwcoop\media\sp_pak_coop1>zip.exe -r sp_pak_coop1.pk3 .\
'zip.exe' is not recognized as an internal or external command,
operable program or batch file.
C:\cygwin64\home\ORWA\rtcwcoop\media\sp_pak_coop1>move sp_pak_coop1.pk3 ..\..\co
opmain
The system cannot find the file specified."
I assume this isn't a big deal and I can just zip the files myself and move them to the coopmain folder....and after that I tried moving the entirety of the contents of the "release-mingw32-x86_64" folder to the main game folder, replacing all the COOP files that would usually be there (from downloading COOP directly, rather than compiling it) and the game just crashes on start....so as I said I think there's a problem with my compiling process
Can you please just compile it yourself after removing that bloc from the ai_cast.c file, and just send it to me or upload it somewhere? It shouldn't be hard and I'm sure many mappers would love the ability to edit AI accuracy as they see fit
my bad, I forgot that this was overwritten by the code
I just checked again, and for coop games the accuracy is indeed overwritten by the g_gameskill setting
I have just added a cvar to the current git version which allows you to disable this, but at this moment I can't create a windows built, so this doesn't help you
about the crash, what's the last thing the logfile shows you ?
my bad, I forgot that this was overwritten by the code
I just checked again, and for coop games the accuracy is indeed overwritten by the g_gameskill setting
I have just added a cvar to the current git version which allows you to disable this, but at this moment I can't create a windows built, so this doesn't help you
about the crash, what's the last thing the logfile shows you ?
I'll try the whole thing again and show you the log file, but for the time being if you tell me that eventually you will release an official version of COOP that allows me to directly edit the firing accuracy, then I'm perfectly fine with just waiting until you release it
If you're not releasing it anytime soon (like it'll take you months for example) then I guess I'll go back to trying to compile it myself
fretn wrote:my bad, I forgot that this was overwritten by the code
I just checked again, and for coop games the accuracy is indeed overwritten by the g_gameskill setting
I have just added a cvar to the current git version which allows you to disable this, but at this moment I can't create a windows built, so this doesn't help you
about the crash, what's the last thing the logfile shows you ?
I'll try the whole thing again and show you the log file, but for the time being if you tell me that eventually you will release an official version of COOP that allows me to directly edit the firing accuracy, then I'm perfectly fine with just waiting until you release it
If you're not releasing it anytime soon (like it'll take you months for example) then I guess I'll go back to trying to compile it myself
there's a big chance it takes months before I release a new version, I don't have enough time currently to properly test everything, etc
Orwa96 wrote:-I reached the point of creating the pk3 file, but every time I type "./create_pk3.bat" into Cygwin
You wouldn’t use the bat file in Cygwin as that is a windows file and Cygwin is Linux so you would use ./create_pk3.sh, you will also need to install zip into Cygwin
orwa96 wrote:fretn wrote:my bad, I forgot that this was overwritten by the code
I just checked again, and for coop games the accuracy is indeed overwritten by the g_gameskill setting
I have just added a cvar to the current git version which allows you to disable this, but at this moment I can't create a windows built, so this doesn't help you
about the crash, what's the last thing the logfile shows you ?
I'll try the whole thing again and show you the log file, but for the time being if you tell me that eventually you will release an official version of COOP that allows me to directly edit the firing accuracy, then I'm perfectly fine with just waiting until you release it
If you're not releasing it anytime soon (like it'll take you months for example) then I guess I'll go back to trying to compile it myself
there's a big chance it takes months before I release a new version, I don't have enough time currently to properly test everything, etc
I tried to compile it again and I think this time the compiling worked fine, however the firing accuracy is still being overwritten even though I removed the lines you told me to remove from ai_cast.c
These lines are supposed to be removed, right?
if ( g_gameskill.integer == GSKILL_EASY ) {
newent->health = client->ps.stats[STAT_HEALTH] = client->ps.stats[STAT_MAX_HEALTH] = 1;
cs->attributes[AIM_SKILL] = 0.6;
cs->attributes[ATTACK_SKILL] = 0.6;
} else if ( g_gameskill.integer == GSKILL_MEDIUM ) {
cs->attributes[AIM_SKILL] = 0.75;
cs->attributes[ATTACK_SKILL] = 0.75;
} else if ( g_gameskill.integer == GSKILL_HARD ) {
cs->attributes[AIM_SKILL] = 0.9;
cs->attributes[ATTACK_SKILL] = 0.9;
} else if ( g_gameskill.integer == GSKILL_MAX ) {
cs->attributes[AIM_SKILL] = 1.0;
cs->attributes[ATTACK_SKILL] = 1.0;
}
You told me to remove this entire block to stop the game from overwriting the firing skill, and I did but when replacing the COOP files with the compiled ones, nothing changed with the AI accuracy even though the file sizes are all different now
Edit: so weird thing happened, instead of deleting the whole thing, I tried (for testing's sake) to just change one of the values, so instead of 0.6 I put 0.1 .....and instead of the AI lowering its accuracy, now the bots can't kill each other at all, they still fire at 0.6 accuracy and I can kill them and they can kill me
But for some unknown reason they can't kill each other anymore, and another weird thing is: this change seems to have applied to ALL difficulty settings, not just easy (which is where this weird change should only be happening)
Orwa96 wrote:-I reached the point of creating the pk3 file, but every time I type "./create_pk3.bat" into Cygwin
You wouldn’t use the bat file in Cygwin as that is a windows file and Cygwin is Linux so you would use ./create_pk3.sh, you will also need to install zip into Cygwin
Turns out you're right, the reason why i was using .bat is because THAT'S what it says in the instructions for compiling, that were written by the developer himself
Anyway despite this solving the packaging issue, it still didn't solve the issue of not being able to change fire accuracy
there is a cvar in 1.0.3beta called g_ignorescriptedaccuracy this when set to 0 in theory should allow your adjusted accuracies to work but this would require you porting this cvar across to your build or at least if you was to examine it's code you would be able to figure out how to allow your adjustments to work you would need to clone the latest github build and have a look. I have tested this cvar a little and it does seem to allow the enemies to be less accurate. one problem i have found with the 1.0.3beta build is if you was to use it instead, the players gun firing sounds are missing in the cooperative gametype for the windows64 build i don't know if this affects the 32bit build or the linux builds. also cooperative is now gametype 3 in 1.0.3beta i sorta think coop should have been left as gametype 2 as classes is very experimental at the current build, so coop should really be the default gametype.
there is a cvar in 1.0.3beta called g_ignorescriptedaccuracy this when set to 0 in theory should allow your adjusted accuracies to work but this would require you porting this cvar across to your build or at least if you was to examine it's code you would be able to figure out how to allow your adjustments to work you would need to clone the latest github build and have a look
See I wanted to do this, but I looked at the github page of the whole thing and it said all the files uploaded there haven't been updated since 2017
And even then I downloaded the code and used it to do the whole "trying to compile it again" thing
So either it isn't included in the publicly available source code, or it is and I just didn't know where to look
Let's say it is available, in which file would that cvar be? sorry I don't know what cvar even means (if it does mean anything special anyway)
did you clone from here "git clone https://github.com/rtcwcoop/rtcwcoop.git" as this will clone the latest you might want to move or delete the build you currently have in your Cygwin64/home/yourdocumentsname and download a new, as for cvars they are the commands that go in your server config or can be used in console that control how your server is setup plus some other things, but sorry i don't know where you might find that cvar within the code fretn may be able to help you with that. oh and most the files haven't been updated in years but if you look at the code entry you'll see that it was 3 days ago.
did you clone from here "git clone https://github.com/rtcwcoop/rtcwcoop.git" as this will clone the latest you might want to move or delete the build you currently have in your Cygwin64/home/yourdocumentsname and download a new, as for cvars they are the commands that go in your server config or can be used in console that control how your server is setup plus some other things, but sorry i don't know where you might find that cvar within the code fretn may be able to help you with that. oh and most the files haven't been updated in years but if you look at the code entry you'll see that it was 3 days ago.
Thanks to your help and link, I did find the cvar changes he made to the code
I did add them to my code and compiled it, and lo and behold it FINALLY works, I used the command ingame and it did make my own set accuracies be the actual ones
Big thanks to you for replying so fast and obviously thanks to Fretn for adding this change, but to you because you replied so fast, Fretn is the MVP but he takes months sometimes to reply back
That’s great to hear you got it sorted, now all we need is a fix for endmap as that can bug out and make the enemies invincible, and for cvar g_log to actually create a log you can find and rtcwcoop would be getting nearer to perfect. But glad to have helped with your issue. Oh and maybe the possiblibilty of respawnable items and weapons. This is a great mod but I feel it could be even greater if it wasn’t for a few restrictions. It just needs a few more options possibly in the form of cvars so it can be tailored more. Not everyone likes things set in stone so to reach a wider audience it needs to be a bit more flexible.
Hey man I tried replying to your email to send you the files you asked for, but this happened:
"Delivery has failed to these recipients or groups:
Darren Davis (****)
Your message wasn't delivered because the recipient's email provider rejected it."
If you have suggestions for other ways I can send you the files I'd be glad to do so
Alright mate I sent another email to you.