sukhoi191
Member-
Content Count
12 -
Joined
-
Last visited
-
Medals
Community Reputation
30 ExcellentAbout sukhoi191
-
Rank
Private First Class
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Accessing the position of "CraterOnVehicle" causes the game to crash
sukhoi191 replied to sukhoi191's topic in OFP : MISSION EDITING & SCRIPTING
Thanks for the info, that's interesting. I took all the class names from CfgNonAIVehicles and repeated the same test just to see which ones will crash, which will retain position Z, and which will reset to [0,0,0]. Here's the results: It looks like it's safe to use getPos as long as you avoid a couple of specific classes. Of course, it's possible that there are other classes which will cause the crash (I tested only the ones in CfgNonAIVehicles) but for now it should be enough to fix the mission. If anyone wants to check it out, here's the script I used: -
sukhoi191 started following OFPr.info / ofp.gamepark.cz, Accessing the position of "CraterOnVehicle" causes the game to crash, Persistent Save System and and 1 other
-
Accessing the position of "CraterOnVehicle" causes the game to crash
sukhoi191 posted a topic in OFP : MISSION EDITING & SCRIPTING
I'm probably about 20 years too late for sending OFP / CWA bug reports but here I am, doing just that. Now, to be serious, I'm hoping someone might give me some idea why is it happening. To reproduce a crash, simply try to execute the following script: crater = "CraterOnVehicle" createVehicle [0,0,0] craterPosition = getPos crater What causes the crash specifically is the "getPos crater" function call. Judging by the crash dump, the game tries to access a NULL pointer. It doesn't matter what position you provide for the instance. It may seem like I'm really trying to find problems but it's actually a result of a thorough analysis of CWA crashes I got. Recently, me and my friend happened upon some great crCTI missions. The only download link I could find is here if anyone's interested. After playing for some time on vanilla CWA I decided to try them out on FFUR 2007, specifically FFUR-SLX 2007 2.5. In the crCTI missions I mentioned there is a function "Common\InForest.sqf" which contains a "while" loop. It seems to work like the "nearestObjects" known from ArmAs. In CWA, only "nearestObject" (singular) is available so it makes sense to write your own implementation of "nearestObjects" if you need it. To keep things short, here's the important part: while "_i < 100 && _c < 4" do { _dist = 30*(_i/100); _dir = _i*20; _pos = [ _this select 0, [_dist*(sin _dir), _dist*(cos _dir)] ] call funcVectorAdd; // "Art0" setMarkerPos _pos; _object = nearestObject [_pos, ""]; // this is important ...and then: if (((getPos _object) select 2) > 5) then To summarize: "_object = nearestObject [_pos, ""]" might find an instance of "CraterOnVehicle" (which seems to happen regularly on FFUR but never on vanilla). "getPos _object" in the "if" condition causes a crash when _object is a "CraterOnVehicle" instance. I have a theory why these crashes occur on FFUR 2007, but not on vanilla: FFUR adds much more effects like flames and smoke. Perhaps it is creating "CraterOnVehicles" instances more freely than vanilla, and so the "while" loop is much more likely to find one. I know it can be easily fixed by skipping "CraterOnVehicle" instances in the while loop, I'm just curious if anyone has any idea why is it happening in the first place? Also, I was able to find more objects causing the same crash (e.g. "Crater") so knowing the reason for this issue would be very helpful in pinpointing any other potential trouble-makers which should be excluded from the loop. Here's how they both look like in config.cpp: class Crater { model=""; simulation="Crater"; }; class CraterOnVehicle { model=""; simulation="CraterOnVehicle"; }; Obviously, my first idea was that the "model" is empty so maybe this was the culprit, but I quickly found an example proving otherwise: class Track { model=""; simulation="track"; }; When I create an instance of "Track" and call "getPos" on it, it correctly returns the position, so empty "model" isn't the reason (at least not by itself). -
Thanks @LSValmont, I'll do my best to make it MP compatible when I find some free time 🙂
- 5 replies
-
- 5
-
- persistent
- save
-
(and 1 more)
Tagged with:
-
Project URL: https://gitlab.com/sukhoi191/arma-3-persistent-save-system While I was playing Ravage mod, a lot of problems with the official save system emerged after time, since it probably wasn't created with long-term missions in mind (I mean like 50+ hours spent on a single mission). Most prominent issues I came across were: worsening performance, probably due to a lot of stuff that was saved and wasn't really necessary for Ravage playthrough, for example: every single damage to every single building, even if you just accidentally tapped one with a car; compatilibty issues - while fixing save file after minor version update was pretty easy, I wasn't able to fix it after major version update, which I think is expected, since major version change can make some things incompatible (this was also the last straw that made me start this project); gameplay issues (at least in Ravage), for example: actions taking forever to perform and very long saving / loading times. After playing Antistasi, I was pretty amazed by its save system, which was using profileNamespace to save data. It's elegant and easy to backup, as long as you keep separate ArmA 3 profile for each mission using this save system. Unfortunately, it doesn't seem to be written with reusability in mind. Considering all this, I've decided to write my own persistent save system, which is based on Antistasi idea (i.e. using profileNamespace). I've tried to make it as extensible as possible. I wasn't considering MP while working on this project and I'm pretty sure it's currently SP only, but I have no problem with extending it for MP as well, although I can't really do that right now, since I'm lacking some knowledge in that matter. If you know more than me and think that it's worth your time, you can certainly help with making it happen 🙂 I'm using it for Ravage and it works flawlessly. Currently, it's in alpha stage, since noone besides me really tested it. Of course, there's a lot of room for improvement, but here's what's implemented right now: Saving and loading data of: units (class, damage, position, direction, equipment, side, skill, full identity, rating, stamina + fatigue, formation, variables, orders, team color, units in group (if given unit is a leader), vehicle if unit is inside one); vehicles (class, fuel, damage, cargo, position, direction, turrets data, materials, textures); containers (class, cargo, position, rotation); specified variables from any namespace; map markers (appearance, position, rotation, text, user-defined). Simple trigger-based radio save system (1-9 are slots, 0 is used for saving - save is created automatically on the oldest slot). Action for marking / unmarking given vehicle for save (it can be easily extended for other object types as well). What I want to be done in the future: Releasing Ravage mission with this mod built-in, along with some other helpful stuff. It's WIP and I think it should be ready pretty soon. Making it into a Module (currently, I have no idea how to do this, I'm not really an addon guy). Creating GUI for saving, since radio-based system isn't that great, as it doesn't let you choose the slot on which the game will be saved and prevents you from using radio for other purposes. I think a custom GUI in game menu can be created with CBA (?) Extending saved data along with BI extensions of scripting language. Stuff described on issues page. Any suggestions, criticism, ideas and help in development will be greatly appreciated! Let me know, what you think about this project 🙂
- 5 replies
-
- 10
-
- persistent
- save
-
(and 1 more)
Tagged with:
-
Old Man - crate with unlimited cargo space
sukhoi191 replied to sukhoi191's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@pierremgi You're right, they are in 3den. Found them thanks to the class names provided by @M1ke_SK. Thank you very much for your help 🙂 -
Old Man - crate with unlimited cargo space
sukhoi191 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
For quite some time, I'm trying to find a way to create an ammo box with unlimited (or limited, but having high enough capacity to be considered practically unlimited) cargo space, without having to create a separate mod. There's exactly something like this in Old Man scenario - a small ammo crate in protagonist's house, in which you can put anything you want, as much as you want. I didn't find a separate ammo crate in Eden editor, so does anyone know, how did they achieve that and if it's possible to use it in our own scenarios? -
Hey faguss, it seems that your website is down. Are there any chances for fixing this problem?
-
Thanks. I'm not sure if it's not an irony, but I just really like this idea and I'm curious if it's possible to do or not, even if it won't work efficiently enough to actually use it in missions. Seems like even predefined function that calls wget doesn't work for me, it crashes CWA with the same reason as fgets mentioned in one of the previous posts. I wonder if it's not an OS-related issue (Windows 10). Microsoft just loves to gradually restrict access for applications, which generally isn't a bad idea, yet I miss Windows 98 in this matter. One could delete whole Windows folder, while Windows was still running. I think I'll try to get some info on MSDN forums.
-
Thanks for the answer! I'm surely gonna check it out this weekend. I must admit wget is a pretty clever approach. While being at it, my idea is to manage most mission's logic externally by another application. I think it would be much cleaner, easier to maintain and powerful than writing the same thing using only OFP's scripting language. Not to mention all of the other possibilities, such as using a database. It would work like this: Create a new "agent" function in fwatch source code (it would send input acquired from OFP's script, then wait and read the output from external application). Input would consist of a command name and optionally parameters, let's say: IS_OWNER PLAYER CAR1. External application reads the input. External application's parser processes the input and calls proper method / function / whatever accordingly. fwatch gets an output from external application, for example as an array, which I've already mentioned in my previous post. Main advantage of this solution: it would be very, very flexible. One could provide it's own program without the need to change anything in fwatch. Just provide the path to the executable, make sure it's there, parse the input (which could be totally different than my aforementioned proposal) and return something in format of OFP's array. One more thing comes to my mind - what about upgrading fwatch project files to Visual Studio 2015? This may seem as a trivial question, yet I guess you have some good reasons to keep it in the older format? Surely upgrading isn't as easy as using officlal VS's project upgrade feature, as it doesn't compile anymore. I didn't really try that much to fix it, but I will in the free time. Adding described external logic to fwatch could also work, but it would limit us to using C++ as a main language and we would have to recompile it every time and swap DLL, instead of doing so only with our external program in case of any changes.
-
Hey faguss! Do you think it's possible to launch another application from CWA / OFP thread and send the output to the game? I have already tried to do it simplest way possible, as I'm not the biggest fan of WinAPI: char buffer[256]; FILE *fp = _popen("test.exe -c xxx", "r"); QWrite("[", out); int first = 1; while (fgets(buffer, 256, fp)) { if (first == 1) { QWrite("\"", out); first = 0; } else { QWrite(",\"", out); } QWrite(buffer, out); QWrite("\"", out); } QWrite("]", out); _pclose(fp); test.exe prints all of passed parameters. I want to return them as an array to CWA - it doesn't serve any purpose, but that's just for the sake of simplicity of testing. CWA crashes after executing this code. Here's the reason from crash dump: I can't really find anything useful on Google. The error is obvious, yet I don't have any idea on how to fix it or if it's even possible to do. What's also worth mentioning, it doesn't crash on _popen. It's fgets(buffer, 256, fp) that messes things up. Is there some "special" folder which won't cause any cries about privileges when CWA tries to execute something in it?
-
I have no idea, why I didn't check it before, as I should've done it at the very beginning: Tim Pink - Music composition & production It seems it was composed specifically for ECP, so I guess there's no version in better quality, although I'll try to reach this guy :) Thanks!
-
Hello! I know it's been a while (11 years?) since ECP was released, but I'm sure most of you remember, how awesome it was! A couple of days ago I stumbled upon installer of aforementioned mod and all those good, nostalgic memories just exploded in my mind, partially thanks to the installer theme. So, anyone knows, what is this music? Was it recorded specifically for ECP? Is it a cover? Original? Here's a file from setup executable: https://www.dropbox.com/s/qgu9j2et2txo8sh/Anthem.wav That's all there is. Just "Anthem.wav" with no tags. I would really appreciate to know, who composed it and if I can find a vesion of this epic instrumental in better quality. Thanks!