#arma3_scripting
1 messages ยท Page 334 of 1
That's a misson, right?
You'd need to edit the mission I guess.
Yeah I'm totally winging this ๐
I mean I have lots of stuff in my own version already. New checkpoints, new enemy spawn locations, new escapes and new spawns
We can spawn from the air now via halo jumping ๐
"Virtual Arsenal" or something like that.
Yeah I tried doing that but it didnt save for the bandit groups
Maybe there is a script that equips them.
You'd need to edit that script.
Idk that mission.
I had to add virtual arsenal for my own group and a line so we don't lose our gear upon death
Yeah, I'm just trialing and erroring right now, honestly
It surely can't be 'too' advanced to change an AIs loadout, right?
Yeah. I mean I'm backing up everything so I am happy to get this wrong
I think thats what its all about anyway
plus I'm having fun doing this for my group lol
Ah, so these are much different files now
.p3d's
feel like im doing something wrong now, huh
p3ds most likely arent in the mission
yeah I was thinking this
I figured the file I'd be opening would have the names of weapons/equipment
Well, you can have .p3d in a mission now with simple objects.
They're the models for this game.
So no loadouts to find in those files.
@indigo snow Sure the basics are pretty simple if you can also always fire it yourself. E.g. you control the scripts that change the inventory Just maintain a list with all the functions that need to be called and a function that calls all of them
Seems nice, the thing is im not messing with actual objects but rather containers inside objects (say i have a backpack inside a crate)
so its a little harder than that, because it's an item nested inside another item
but i'll try! thanks for the suggestions
You can also run a pfh or a loop that checks if the inventory contains the same things as it did the previous frame,
Are you editing the content or is something external editing it?
If its always controlled by you, you can run the event calls
Well I changed the Viper Stalkers to what I want! sweet
I find it strange that the Guerilla guys have a much different set up to the Vipers
missionNamespace and profileNamespace already excist durin the preInit?
They all always exist, but missionNamespace gets cleared right before preInit.
I sure wish my Viper Stalkers wouldn't disappear when i remove a piece of ammo ๐
private _var = nil; Sets it as private?
If there is a shitload of em private["_Var1","_Var2","_etc"]; (old habbit)
Yeah. After some amount private ARRAY will be faster again. I guess. If you only want to initialize them to nil. Which you very rarely want
What have I done?!
@indigo snow im making those changes by myself - thing thing is, it's two different systems. but yeah i'll improvise some kind of system (probably setVariable a function on the object and then call a function that executes the getVariable function)
i've put that thing off the priority for now because those two systems are not complete
Fair enough, but in the end its all pretty simple to manage
i have another question tho.. would anyone happen to know the formula for mass of a backpack / vest with items in it?
i'll explain it better.
i have a backpack with maximumLoad of 160 and mass of 20.
i have 4 uniforms inside the backpack with mass of 40 (they fill the load to full 40*4 = 160)
now, for some reason - putting 3 of these backpacks (mass of 20 + 160 full load) inside a vehicle with maximumLoad of 1000
now ideally, I thought the mass of that backpack would be mass + maximumLoad which is 180
but 3 full backpacks fill the load of a 1000 maximumLoad container
makes no sense.
There is no real formula, theyre imaginary points
what does it mean
Load doesnt have a dimension
Its just a number
It doesnt closely correspond to anything in the real world
They are made up as you go along
Et cetera
i know
but the maximum loads are configured in the config
and the mass do too.
and they match their description
Can parameters only be numerical values? can I not have false/true ?
i've tested it. i've put 4 combat fatigues (have a mass of 40) into a backpack with 160 maximum and it actually fills the load completely (checked with loadAbs)
wait no
checked with loadBackpack
the thing is when I put that thing in a container there is no loadBackpack or anything because it's not a unit
I think you will have to add them up yourself.
okay that makes no sense
when i have the 180 (full backpack) on the player with nothing else, loadAbs outputs 180 - which is expected
but when 3 backpacks put into a 1000 maximumLoad ammobox
it's full
what the hell
@peak plover 1 is true and 0 is false.
since 3 full backpacks that weigh 180 fill a 1000 maximumLoad container
the container treats them as 333
333/180 is 1.85
it's just a magic number off the top of my head
What.
I took a full backpack the has the mass of 180
i put 3 of these inside an ammobox with maximumLoad of 1000
and those 3 backpacks filled all the space
Maybe the backpacks have cargo too
yeah
the backpack itself has the mass of 20
with maximumLoad of 160
and it's full
so
180
also, it's confirmed by running a loadAbs on a player with nothing but that backpack
returns 180
I wouldn't be surprised if it's all bugged up. When you load a rocket launcher with a rocket, the ammos mass is counted twice for your soldier.
Might be that it counts the mass of the full backpack + the mass of the contents. Instead of emtpy backpack + content
Seems thats whats happening here, 20+2*160
so every backpack weighs 180+160
yeah that adds up to 340 but the maximumLoad of that container is 100
there's a little bit of a remainder
Empty the backpack into the container then add an empty backpack
See what it comes up as.
yeah hold up
/shrug told you its all magic numbers
damn it is there anyway to actually search the config viewer
If you get a config dump
you can type the classname
where
just type
damn thanks
yeah the typing thing in config viewer doesnt actually work
you type but as soon as you stop typing it searches
dont have the time to type an underscore
yeah
if BIS has like 3 commands that are applied to units, also applied to containers
i'd be saving myself 5 hours per function for my inventory system
and by the way commy, i did manage to do a function that adds weapons with items to a container
it just takes 1 second per weapon to get dropped..
also using a dummy unit - which is bad for MP
so yeah..
you were right
how so
The AI will try to turn and the drop action will break.
It's not reliable, no matter what you think you achieved.
yeah
this function was really easy to make.. too easy. just dropweapon and sleep
or waitUntil anim is over, i can't remember
anyway I dropped the weapons thing but still into the inventory system
is there any chance bis will add those commands?
maybe talking to someone specifically will help? or is there any way to contact a dev and ask about certain aspects of modules? (like the god damn mass)
or is it all bounded to making a ticket and waiting for a week to get an answer
Bug KK about it. Maybe something happens
That's your best bet tbh
you can make a ticket and wait for 2 years for any reaction. Not just "a week"
Best way to request it is the scripting discussion thread on BI Forums that explicitly says that is not the right place for feature requests
A smart Modder can't create Script commands.. Well... Most smart Modders atleast.
kk was a Modder and is now a "dev"
oh nice
is there anyway to contact him? i've noticed most of the devs dont have any discord account
kk was a Smart and is now a "dev"
or atleast not here
Yeah.. For example as he allowed everyone to have debug console on every server with his "security update"
hahaha ok
Does that script feature request thread still exist?
๐ฟ
damn man, if we could extend the engine with the c++ code
i bet this game would be flying, not that it isn't flying right now
Well. Intercept :u
what
I asked Dedmen to add custom "commands" like that via intercept, but he's too lazy to even release TFAR 1.0, so...
Like a year ago.
this library has access to the actual source code?
No
It's a Hack basically. Not a Cheat-Hack. It's just a Hack.
You're a hack.
beep boop
does it have access to data SQF doesnt?
Very limited yes.
It could have access to much more stuff. But we don't want to do that because that stuff could break with every Arma update
And we don't want Intercept to break
And that was your answer back then too.
very limited as? can i, for example.. add weapons with attachments to containers with it?
I could make InterceptX that has these features but breaks every Arma update and is not Battleye compatible.
But I doubt anyone would ever use that
or can I make it do it?
Intercept can get raw position data from Objects and list all files in all loaded PBO's. The rest is just stuff that SQF also can
Depends
If you have a couple years of experience Hacking games and Programming C++ then you probably can.
TLDR no.
I guess it's more a function improvement / to command thread, close enough
but the question is
how
and is there any requirements to make it work?
say i want to distribute an intercept extension with a mod
if that is even allowed license-wisely..
Your Intercept Plugins are your copyright.
Requirement is that users also need to have the core Intercept Mod loaded
how
Like this I guess
If you need to calculate a lot of things in your mod, then you can calculate in C and then send results and grab data from sqf. I don't see any "REAL" benefits for normal users
damn
the thing is intercept is bounded to sqf
it doesn't extend the engine, it replaces the SQF calls with C++ class if I am correct
๐ฆ
do you think nagging KK for example would work
best scenario?
Tell him commy sent you.
How do you add Attachments to a weapon? AddItem?
If I could add reactions to posts...
Oh gosh
addWeaponItem is basically the only way
all other commands are specific to slots of the unit
while addWeaponItem finds automatically
the functionality is the same
AND IT FUCKING SUCKS
the input container is only a unit
addWeaponItem doesn't find it automatically. It finds it by classname.
oh
right
same
damn I've been coding for arma atleast three or four years
in the last couple of weeks I've actually encountered the limits of this language for the first time
by limits I mean not-workaround-possible limits
Okey. Theoretically possible to be added from Intercept. But a lot of work.
Work that I won't do most likely
Everything
there must be a part
No. Everything. It is a little easier to copy a existing weapon though
so basically dropWeapon but you can give it the target Inventory and you don't have to wait for animations or anything
can you give me the line of code that calls dropWeapon? I guess you are using action?
the whole point is copy
where? in my script?
and yeah, I use action. (is there any other way?)
no other way. Just need that line of code so I can see how the game does that normally
private ["_dummy", "_weapon"];
_dummy = call fn_createEmptyUnit;
{
private ["_weapon"];
_weapon = (_x select 0);
_dummy addWeapon _weapon;
{
if(_forEachIndex > 0 && !(_x isEqualTo "") && !(_x isEqualTo [])) then {
_dummy addWeaponItem [_weapon, _x];
};
}foreach _x;
_dummy action [ "DropWeapon", _container, _weapon ];
}foreach _weapons;
//deleteVehicle _dummy;
};```
normally _dummy action [ "DropWeapon", _container, _weapon ];
take note _dummy is a unit, _container is an object, _weapon is classname string
No need to tell me that ๐
it takes the real weapon tho, with all attachments (even if not configured as linkeditems in config)
ok
ok
why is there two private "_weapon"?
good question hold up
oversight
thank you haha
deleted the one inside the loop, redundant
Okey I just have to create the action without playing the animation...
Yes. Exactly. How do I create a custom Action in Intercept
I even tried making a dummy AI class without animations before, but it must've failed.
intercept actually has the actions configured?
No.
doesnt it just send the action string to the engine? (for what I understood about intercept)
I'm talking about adding a custom system for that to Intercept
wow that sounds very complicated
is there a chance
earlier versions of arma 3 had the inventory made using sqf scripts?
or was it engine handled all way from the beginning?
because I've seen an init script for the inventory with some comments referencing some actions has // ToDo: Handle by engine
and only a simple control text setting was used
It takes so long because the Unit switches to secondary weapon right?
no no
it takes so long because it does a "put" animation
if the gun is on the units' back
it doesnt even switch
just a put anim
Ok. Then I need to find out where it does that animation and disable that
@mortal halo player switchMove ""; zero transition...?
the action actually waits for the animation
say i spawn my unit on water and it swims
it cannot drop the weapon
because the action cant be played
Maybe you need to recreate your put action, create a weapon holder in front of the player and sorts.
what do you mean tho
Killing...?
switchMove "" stops any running animation -> Killing it
aye
Do you know the name of that Put Animation?
could surely find out
dude i love it how in the forums when someone asked how to do that
a BIS dev replied
to simply add a class of the weapon with attachments
for the devs, it's "simply" adding a class
hahaha
Well. It is simple
I think it's a change of perspective
exactly
But, that's no reason to shame them for that. They play client variants to test shit or even just to play sometimes ๐คท
Mods are no exclusion to that
ok
dedmen
im gonna upload a screenshot of systemchat with outputted actions
i mean anims
there are all kinds of transitional anims here
You guys are doing what I tried years ago. GL
But you didn't have Intercept and my knowledge :u
I had my knowledge.
these are the actions
they are transitions for standing positions
lets assume the character is standing
what are you trying to do exactly?
dedmen is trying to implement a dropweapon command with no animation
that is possibly going to perform instantly
using intercept
Thanks found where it plays the anim. Now onto finding out how to disable that
peek
Every unit has the list of Animations in his config. You can just set his putDown action to "" and he won't play any
wow
would it really work tho
because the actual weapon is being moved in the engine
maybe it waits a hardcoded set of time?
true
if you're right, this shall require no intercept
maybe
๐ฟ
Yuval, you're paying for my advil prescriptions the next few months. Too many headache inducers.
call me when it works
haha
wait
if you can save us the trouble
midnight, i've made a really complicated function that copies a backpack with items from a container and puts it in another - it wasn't possible before and there are no bad practice workarounds. just a messy idea and alot of arrays! so im sure it's possible SOMEHOW
you remember that!
just temporarily speed up the unit's animation speed so much that it looks like there is no animation. done. next
Oh I remember. Very clearly, and well. It worked through immense trial and error
you guys here reverse engineering, making intercept and shit. so much effort
rome wasn't built in a day. but it was
sure, their piza tower had bugs
but it works!
Pizza buildings ๐ BUGS
pisa
oh
Pisa?
yeah
Oh yeah
Changing Anim speed might also be a very good solution
it has a tower which leans, in case you were wondering
see dedmen, you gotta think more simply
Pisa - Capital city ?
take the path of least resistance
dedmen, I think it can be done in sqf doesnt it?
Think so yeah
hold on lets see
๐ฟ
setUnitAnimCoef or something
Okey I found it. It plays the animation and at it's end it executes the real action.
So If I just execute it right away..
think it maxes out at 20x or something though
Increasing animation speed of a unit also increases its run/walk speed (thanks to Killzone Kid)
not sure if genuine thank or sarcasm
Okey I solved my part. I now know what I need to do to make this work.
Still it would be a few days of work. So if there is an easier solution.. use that
well it doesn't work anim speed wisely
i feel like everytime we suggest something
and commy2 replies with a popcorn thing
he knows we'll fail and waits to see it
It's almost as if someone tried all this years ago.
hahahahaha
he types slow
Dedmen is a conman.
Next step I totally never tried myself: create dummy soldier class with modified animation config.
Oh god. no..
I need to do alot of stuff manually. Well.
I need to find one function signature. One Virtual function offset and one class entry offset. and then ducttape all of that together
what's the end goal with this? why is animation-less drop needed?
because it has a delay
Would be about a day of full work. But I don't feel like working that much currently
And it breaks when the AI fears collisions.
why can't you just remove the item from the unit's inventory, then create a weaponholder at his feet and add it? that would have exactly the same effect
You can't add Weapons with attachments to containers
it has attachments
yeah...
Try adding a MX SW without bipod to a ground weapon holder @rancid ruin
I put the solution to that into my notes. Maybe I'll get to it someday
it'd probably take BIS 1% of the time you guys have spent on this, to just fix it internally
or rather a command that only uses the final execution
yes
Normal Action command runs animation and when the animation is done then it executes the action.
Mine would basically just be a copy of the action command that executes immediatly without animation
so it will take us 200% of the time making them do it
i see
do you think, it will have some kind of sequence
if i were to run that action
three times
Don't think so
in a row, would that work?
oh
damn
dude there has to be a way to make bohemia fill those gaps
i wonder what do the programmers actually do in a workday
i mean there's no way these kinds of issues can't go into their priorities
Work on DayZ Standalone.
that's actually a funny joke
Can't you just add a variable to the weapon or container with whatever attachment and have a function that runs everytime something is taken/added?
What do you mean?
Don't use action at all. Just a script that removes weapon and adds weapon
that is actually a good idea, and out of the box thinking - sticking it to the container
Compatibility.
but it breaks compatibility
in my case, im actually redoing the whole inventory system
so that COULD work
With vanilla inventory?
yeah
You can have extra functions for that as well
And all the mods out there.
that do the same
yeah
You just won't be able to take attachments from the weapon if it's in a container
you would. hahah
with the variable you set
you could change that
i've made custom scripts that remove certain backpacks with items
It seems like a worthy sacrifice. How would it conflict with mods?
depends on the mods
if it's just weapon addons
nothing
if it's anything related to inventory
it would
or actually
maybe not
to make your idea work
you have to be in control of all changes to containers' inventory
if a mod relies on a containers' inventory data - it would deem incompatible with such mod
(move gun to container) > save all gun info > (remake only gun in container) > grab gun from container > ("ohh it's this gun, take these attachment function" > get gun with all the attachments back
yeah
what you're saying makes sense.
taking it a level forward
it would be better to actually just make all inventories virtual
in an essence, disable the inventory actions and save all inventory data to a variable on objects
Yes, well you don't have to, but I assume you will remove vanilla inventory completly
That would be nice, yeah
But how would the guns appear like if you wanted to drop them on the ground?
that would be easy
True
"ANYTHING IS POSSIBLE"
You just need enough drugs
caffine is a drug
the only thing that demotivates me from actually trying
is knowing that if BIS ever adds the commands we need
this all becomes obsolete
I got a liter of coffee too, time to work on my seed and profileNamespace for JiP
Nigel, please don't tell me you're one of those Mormons that are going to tell me that I'm a sinful piece of shit because I like a cup of coffee in the morning?
GASP #offtopic_politics
has anyone ever done such thing
virtual inventories
i mean
yeah
virtual arsenal
hahaha
but except that
or actually...
virtual arsenal
one moment.
Virtual Inventories - Not really limitless like the VA, but it's not physical either
NOTHING IS IMPOSSIBLE.
DONT LET YOUR DEAMS BE DREAMS
what about faster than light travel?
you can travel faster than light
show me
it's possible
you can't pass the speed of light
but if you start with an initial velocity faster than that speed
see
it's scientifically proven
there was an experiment a few years ago i think
Yeah they have, but with limited results
it's scientifically proven
No it's not.
setVelocity in a3 works similarly if cranked to high values
yeah, but that's because floating point precision
i think
anyway, im gonna give a try for a virtual workaround like @peak plover suggested
i dunno im too lazy
Yeah, whatever works is good ๐
Some vanillia stuff is pretty bad, I still can't get over scroll wheel menu :S
Especially when you go near something and it pops up on the middle of your screen
Is there a way to disable that or move the UI icons for the "rearm" etc. icons that are in the middle
I'm sure there is
The game options don't seem to work for that
This would have to be some weird magic 'tho and have an alternative that it uses
- Hide the action 2. Add the action in an alternate system like ace_selfactions 3. Do this automatically :S
oh wow
about the whole
mass thing
yeah
the inventory display itself is bugged
because it doesn't tell the truth
you can put more mass than the maximum load I think
first aid kit has the mass of 8
and I have put 126 items in the 1000 maximumLoad container
making it contain a total of 1008 script wisely
you can put scriptwisely as much as you'd like
no one is safe!
Ohh yeah, that's why you have containers where you can take items out, but not put anything back
Script ignores limit
Probobly have to do your own function and add a manual check in it for load
i have
that's why the numbers didn't add up
i made a custom function that calculates the max load of a container using config entries
also calculate the current load, by calculating all the masses of all the items inside the container
and the calculations for backpacks weren't right because i relied on the inventory progress bar display for ammoboxes
atleast they hid the bugs well so we won't notice
haha
Feels so bootleg
That's like everything in life 'tho
yeah, well it isn't
haha
in life you can make ugly things look nice
you put make up on it
here you can't
or, you can - we just scratched the make up hard enough
The less I knew about scripting, the more working and polished it looked. But the more I know, the more I belive is possible
i can't believe i already put hours of work
because one single c++ line missing from the engine
this thought is a massive demotivation
You are hours of work smarter now than you were before hours of work
yeah, it is true
infact, i've made tons of script libraries for the past years
never released a thing
but it all made me smarter
Ever have a great idea that you think will be impossible to achieve? thats where I am now ๐
me too haha
I hate that my imagination for ideas is too much for my dumbass to keep up with
What are you doing with Escape from Tanoa now ? ๐
I did good stuff today, added new loadouts for Ai and increased their size ๐
but my idea is using the 'Hummingbirds' (BLUFOR) in Tanoa
but ye, many issues since i need to switch their sides and then have them fire on us like in Malden
its a nice dream though ๐
What you want to do is spawn the vehicle without crew and spawn the crew from csat forces
That way you don't have to change their sides
you could always play as independent and then fight blufor + opfor, but they would shoot eachother as well
Yeah I think that'd be a mjaor issue also
I think this may be one of those things that sounds cool but wont happen
You can also decrease your own rating or set yourself as enemy to all and then have setCaptive true for the heli
that's interesting
It may not even be worth it due to Tanoa being very jungle based
Malden is pretty damn open
You should just check the workshop or google for some of these things, I bet there's a version of escape from tanoa in which you play as CSAT and enemy are BLUFOR
Because if you can think it, then somone already made it 90% of the time
Yeah
maybe so
i think baby steps are better for me right now
I'm thinking way too big for what I can achieve lol
Yeah, a lot of people try to get into missions/scripts and try to bite a too big piece to begin with.
I only started doing any of this a week ago really
I did a few scripts years ago for Arma 2 though
i'd say just do everything from scratch
you don't learn anything from copy/paste
and even complicated stuff is simple if you break it in to separate parts
I am happy just adding stuff to escape tanoa right now
I will probably make my own small missions after that though
Why does the Huey mod have to be blufor ๐ฆ
i got excited then
What if I profileNamespace setVariable ["myVar",123,true]; what will public mean in this case?
Will it profilenamespace the variable to all clients?
Also is it stupid to save a bunch of stuff to profileNamespace, and should I purge it in my scripts? Any real danger of it getting too big?
And what would be a good way of doing so. Any way to get real life date without extensions?
For a fact, saving stuff onto profileNamespace is a bad practice - especially if in MP.
yeah, I guess its okay for those kinds of things only because that's the only way of keeping data
but if you do - try to not save anything onto players but rather on the server
I remember making a mission and I didn't want to use any of BI saving techniques because it's bad
Yeah, it's semi good way. I think I will save all the variables that are used into a 3rd party variable into the profilenamespace and THEN if it's got like 10 of those it'll delete the oldest one
As in one per mission
is it important to save onto players tho? or could it only be on the server (which could, propagate the data to the players)
That's a fucking hard one
So if I save for ex. the position of the player and he reconnects. He will get the unique seed of the current mission from the server, check the profileNamespace for the array of said seed and grab the position from there., why is this bad?
I could save the same information on the server, but this would also include player uid and then player could ask the server when it reconnects for info from himself, but this could be a giant packet of information containing gear/position/extra variables
profileNamespace isn't terrible, and in some situations it might just be the only way to save info without a DB
profileNamespace is mainly bad due to security - that's why server sided DB addons are used.
No you can't get real-life date without extension
I feel like I should make functions for both versions, but I feel like the postives of client profilesnamespace are better
I don't think publicVariable on profileNamespace works
could be wrong tho
anything you save in profileNamespace the player himself could change
wont work
Go for namespace, just do know you're filling the players' profileNamespace with variables on their machine. If everyone did it, people could have bad impact
so storing mission progress in there is not a good Idea for a multiplayer mission
let alone security.
ok, If someone figures out the seed and finds the correct line and goes through that trouble to "cheat' and change his position, then he deserves it
what do you mean by seed
// generates seed on the server
// call mission_fnc_generateSeedServer;
// Code begins
// only run on server
if !(isServer) exitWith {};
// generate new seed
private _seed = random 999999999;
// generate random seed
if !(seed_reset) then {
// if not reset seed, grab last seed and compare missionName
_missionName = missionName;
_lastSeedArr = profileNamespace getVariable ["seed_lastSeed",['abc']];
_lastSeedArr params ["_lastMissionName","_lastSeed"];
// compare missionName to lastMissionName from the last seed
if (_lastMissionName isEqualTo _missionName) then {
_seed = _lastSeed;
};
};
// Set the mission seed
missionNamespace setVariable ["seed_seedVar",_seed,true];
profileNamespace setVariable ["seed_lastSeed",[missionName,_seed]];
saveProfileNamespace;
well then you just restrict who can acess variables from a player
This is my seed generator
it's not like a player can modify them in their .arma3profilevars
@subtle ore go into editor then
@queen cargo I don't follow?
Is that sarcasm? I don't see that :x
thats why i am banned on KotH servers
I can store multiplayer progress with this, for ex. completed tasks, AI arrays, etc. Then I can have a parameter in mission in case I want to reset
profileNamespace setVariable ["whatever", "memesarecool"]
Well hell. Maybe there could be a way of tracking previous to currently existing variable values
yeah, KoTH saved stats into profile namespace. people used this to change their levels
I was banned for same thing @queen cargo . But they unbanned me because it is a bug abuse so it's only worthy of 2 weeks of ban
Alright, let's just say then. There is much need for a more secure way of writing variables to profileNamesapce
I ran the mission in the editor and changed the money gain to 1000000 per second
do not know ... i know they "solved" it with hashing
did not wanted to spend the time to get that out of the server thus i just tested if it workd
or just compare the old versus current variable values
even worse: the actual hash is stored in RTP
@subtle ore the hash way is secure
you just have to kick if it missmatches
and make sure that the hashing algorithm is safe as a bank vault
Okay, how are hashes used in a3? I'm unaware on how it wroks.
@subtle ore You could generate 3 keys, 2 on server and one on client. Then use a maths to check if the last edit was made from the server or sth
Oh, okay. Gotcha. Doesn't pertain to a3 exactly but more to a concept
Like request a math from _clientVar from server and get the answer, then the cheater has to guess your numbers?
in theory you also can create a RSA based way to validate that
in theory you can also save everything on the server and as soon as there's something different, log the persons details and ban him
however: that will be quite slow on SQF
requires a way to store
profilenamespace is not in fav. here serverside
missionNamespace isn't presistant over something like server restarts though
profilenamespace also available in servers @subtle ore
Oh wow, no kidding? That's interesting.
sarcasm? no need for
you refered missionNamespace having no persistance
No no no, you read me wrong. That was not sarcasm
kk
I am sad to say KK just announced the death of my lovely inventory.
I'll save it for the standalone.
so.. something like this? if(isServer) then {profileNamespace setVariable["CookieCount",0];};
@mortal halo What?
Weapons with attachments into containers isn't on any priority.
how did KK kill your inventory?
Inventory lacks some commands, as simple as that. I personally cannot do anything about it, though I did try what I could.
If my inventory can't deal with weapons
it's not an inventory
^^ direct quote
@little eagle I'd accept an "I told you" now
Hmmm..so why can't you get weapons to work? That doesnt' make a whole lot of sense
You can't add weapons with attachments to containers
and there's nothing BIS are going to do about it.
Why not just set up a dummy unit for each player and add it to the unit, add the attachments. Then put it in the container. Discrete but maybe?
Because when you deal with a tent and 100 weapons
Indeed why not.
you can't wait a second for each weapon to move
and when when you play in MP
you can't have a dummy unit per player
or infact, have a dummy unit at all
It's bad practice.
Yuval, here is another thing for you.
This discussion is essentially the Neverending Story.
So drop out of it while you can to save your sanity.
I'm sure no one has ever tried doing such bullshittery, so I'm not sure how that could be bad or good preactice if there is no other way
I'm trying to create an eventHandler that will work on all vehicles on my Exile server. Basically when a vehicle is damamged >0.95 then it shouldn't explode or take more damage. I want it's damage set to .95 and not exceed that percentage.
I tested the following on EDEN Editor and it works. But it only applies to vehicles with a player in it. I want vehicles without players in them also.
(vehicle player) addEventHandler ["HandleDamage",
{
private ["_veh","_dmg","_overalldamage"];
_veh = _this select 0;
_dmg = _this select 2;
_overalldamage = (damage _veh) + _dmg;
if (_overalldamage > 0.95) then
{
_veh setDamage 0.95;
}else
{
_veh setDamage _overalldamage;
};
}
];
People will not accept certain things and nothing can change that.
you can have dummy units wich do no harm
disableAI is the way to go for it
@subtle ore Wrong. Commy already tried a year ago
@still forum I'm not necessarily wrong , Commy just didn't reach a solution. Eventually there will be a solution for as long as someone pursues it.
@tulip cloud I guess you don't have CBA?
I do
I have a solution. But won't work with battleye and I don't think it's worth the effort
take a look at CBA_fnc_addClassEventHandler not sure if that's really the correct name
It is.
add a Eventhandler to Car and all vehicles that inherit from Car will have that EH.. I guess
How does ace3 move weapons with the unconcious man inventory? Do those weapons keep attachments?
the question that made everyone shut the fuck up
Possibly because there may be some research/thought that may be needed to deliever an answer? ๐คท
Dunno what you are talking about
i personally am just doing other things already
Something like this to server or player init?
["Car", "HandleDamage", {
private ["_veh","_dmg","_overalldamage"];
_veh = _this select 0;
_dmg = _this select 2;
_overalldamage = (damage _veh) + _dmg;
if (_overalldamage > 0.95) then
{
_veh setDamage 0.95;
}else
{
_veh setDamage _overalldamage;
};
} ] call CBA_fnc_addClassEventHandler;
every machine, justin
justin i think you can just return a number to the event handler and have it deal no damage at all - instead of letting it deal the damage and then setting the damage to 0.95
might be wrong tho
Not with that version you can't.
It's the config version that ignores the return value.
Well we are.
the regular event handlers let you handle damage yourself dont they?
i dont see what doesn't work
You could instead use an init eventhandler though and add the handleDamage thing per sqf command if you wanted the return value to be used.
I need to apply it to every vehicle on the server and ones that spawn in. So that is why I use the CBA Fnc I believe
commy can't you just return false and have nothing happen.. like properly override the engine handling of damage?
when using addEventHandler "HandleDamage"
commy can't you just return false and have nothing happen.. like properly override the engine handling of damage?
No, because the config version ignores the return value.
Heyo! I have a question! Is there any way to be sure that code executes in non-scheduled?
don't config
This is based on the config version.
config is bad
Well this is the config version no matter what you think about good and bad.
I need the vehicle to take damage and make it unusable until repaired. So taking no damage would be invincibility which I don't want.
@icy raft run it inside isNil and the real terminology is unsheduled
you want to execute code or you want to check if it executes unscheduled?
To execture it
but if he can use his mission since this is an exile server he should!
I told you the answer then
I know how to make it non-scheduled, but RVE engine stops executing after a few cycles in some cases
Yuval, the CBA function hooks into the config version. If you're using CBA, you don't need to edit the configs yourselfs. It's already done essentially.
i... am.. suggesting.. to not.. use.. cba
Only while loop stops after 10k cycles. The for step 0 loop can cycle forever
So is there any way to ensure that RVE doesn't skip no mater how long is the script?
@mortal halo I personally don't care how its handled I just need an efficient way of making it that all Helicopters/Jets/Cars when taking damage that will destroy them sets their health to 0.95 instead.
@icy raft make sure your loops are not longer than 10k. Or run script in scheduled
Only on loops?
Well man, you should make a regular eventhandler "HandleDamage" on your mission script, with no CBA and have it return false if you want no damage to be dealt.
yes.
Only while loops
Okay
not all loops
I mean, dont use CBA to execute that eventhandler
Gonna write a long init for a mission so good to know
a while loop shouldn't exist inside unscheduled anyway
use the vanilla eventhandlers
a while loop shouldn't exist inside unscheduled anyway
you sure?
depends on the while loop
I want damage to be dealt normally up to .95 anything above that should stop at that point. When you say damage not to be dealt sounds like I'll have a ton of indestructible vehicles which isn't the goal.
Explain this: https://github.com/CBATeam/CBA_A3/blob/master/addons/common/fnc_inheritsFrom.sqf#L35-L41
Dedmen
I will exist in my script, I need to go through a lot of stuff
I am saying, have damage not dealt on a vehicle when your condition for damage >= 0.95 is true
I'm sure there is some BIS function that returns all parents of a class. use that and check if the array contains the name
So?
That's horrible, Yuval
no!!!!!
You managed to write
!CONDITION
the retarded way.
my real problem is attaching the script to each vehicle. It's not so much the condition and returned value.
justin, you already posted the answer.
That will do what you want
Ignore Yuval, he is on too much caffeine.
ha
No ignore commy2, he's giving you 1 year old answers.
BIS_fnc_returnParents
{
if (_x == _baseConfig) exitWIth {_valid = true;};
} forEach _config call BIS_fnc_returnParents;
_valid
There ya go. No while loop
my path shall bring you to victory!
dedmen wouldn't returnParents contain while loops
Now explain this: https://github.com/CBATeam/CBA_A3/blob/master/addons/common/fnc_addBackpackCargo.sqf#L60-L63
๐ฟ
No, dedmen. ConfigHierarchy lists the super classes and not the parent classes.
Or could use in @dedmen
@mortal halo before I take my answer and go I have 1 question.
What BIS fnc will apply that event handler to all vehicles and not just the player's vehicle? This is what the CBA Fnc is accomplishing. If you can give me a script that will more efficiently handle this I'll switch it up...until then I'll continue with @little eagle 1 year old method
calculate the free space and then calculate how many backpacks would fit
@dusk sage No can't. Because that's case sensitive
Who would your two class names have different casing, if obtained the same way?
@tulip cloud if you broadcast the initialization of such eventhandler using remoteExec when you add the vehicles - that will be good.
but, you have to do it in script - using vanilla EHs
Who says they are obtained the same way?
the baseClass is given to the function by a user. The user might have handtyped that string ignoring any casing
if you prefer doing it in CBA, do so.
it's just really preference. i have arrogant and ignorant preferences of not using anything config related if possible
because config is bad.
And you could preferable use configHieracy to avoid the casing with config types
What's the usage of CBA?
configHieracy does not lists parent classes ffs
@icy raft Everything
So what your saying is I need to write it in every sqf which initilizes vehicles. Or I can just write it once with CBA?
You can write it just once with CBA
yeah, but losing the return false and disabling engine handling
keep RV off your vehicles!
Yes, in init.sqf. Not in every vehicles init box. That would mean you have N times the same eventhandler with N being the number of vehicles in the misson.
The code he was using in the beginning wasn't using the return value anyway
To answer a previous question.
The CBA Eventhandler fnc goes in init.sqf?
Yes.
Or any other place that makes sure it's executed once and per machine at mission start.
By that I mean that you could also put it into a game logics init box, but why doing stuff the hard way when that would be exactly like init.sqf?
yes
If you are poor because no one wants to hire you because the scripts you write are so bad. then yes potentially
๐
lol
I wish there was a BIS function or command to add eventhandlers to classes of objects. Then I wouldn't have had to write that CBA function.
Too advanced for 2017
@little eagle isn't that was config is good for? ๐
So hypothetically I should be able to test the script by creating a mission in Eden editor with CBA mod enabled. Add the Zeus Curator (game master) to a dude and put that script into the mission init. Then any vehicle that I spawn should not blow up right?
Well, the eventhandler will execute. No idea if that's enough to never make a vehicle explode.
if(_vehicle explode) then {dont}; How hard was that?
Doesn't ace3 stop vehicles from exploding, and just set's them on fire?
if then don't
Thanks for dividing by 0. You just ended the universe.
car, boat, air are the 3 classes right?
I'm not sure if anyone has got ace3 functioning with Exile haven't found any resources for that. Maybe its just the revive system they haven't got working with it.
waitUntil does not work in unscheduled? Makes no sense...
nvm
It only executes once per frame
makes perfect sense
Makes no sense?
WTF dude?
unscheduled scripts freeze every other part of the game. NOTHING runs while a unscheduled script runs
the result condition of a waitUntil will never become true. You will deadlock the game
You missed everything after and including the >nvm
The reason it's not allowed is not the "it executes once per frame" though. The reason is that suspending is not allowed
Well, you said the same thing just more accurate.
Waituntil could also execute more than once per frame. That fact is completly unrelated to why it is disabled in unscheduled
Repro?
I said could.
I read that.
There is no repro.
waitUntil executes once because that's how the scheduler is built. It is completly unrelated to waitUntil itself
The behaviour of waitUntil is kinda related to waitUntil itself.
It is not the behavious of waitUntil. It's the behaviour of the scheduler
Waituntil could also execute more than once per frame.
I believe this to be false.
Cookiedough is the essential ingredient in cookies
No. You can execute a script more than once a frame. The scheduler just doesn't do that because it's dumb
Dedmen is just wrong when he disagrees with me.
The scheduler just doesn't do that because it's dumb
So waitUntil can't run twice a frame?
You just say something the scheduler imposes on waitUntil is waitUntil itself
That's also false.
wrong if it and all other scheduled and unscheduled scripts that run that frame don't take longer than 3ms
You just say something the scheduler imposes on waitUntil is waitUntil itself
๐ค
A motor accelerates a car. And you are saying the wheel accelerates the car
which is wrong
I don't mind for everything to freeze while something important is happening
Then why is he playing arma ?
freezing and stuttering doesn't matter if it's inside a loading screen or escape screen
Quiksilver knows that everyone prefers a 40 seconds long loading screen with 30 FPS to a 20 second loading screen that is one frame.
scheduled performance is actually worse, because that environment has additional checks in place for undefined variables, serialization, time counters for the suspension...
all stuff that is disabled in unschedued
false, true, true
it can. A scheduler just doesn't execute the same script twice a frame
Therefore required scheduled environment
again unscheduled doesn't create FPS stutter if you don't write bad code
How is that different from saying it can't?
because it can
If you change the scheduler
Yes if you change the rules, the game is different.
Give pigs wings and they fly.
Pigs don't fly, cause they have no wings.
Q.E.D.
Quiksilver should stick to politics.
Explain that expression.
I hate bloomy words.
I have no idea what mod performance is.
Show me a place where it is done and it's unnecessary
Biggest FPS drop caused by ACE is Interaction Menu. Which needs to be drawn every frame. So the code needs to execute every frame. In unscheduled
having something execute with high precision timing, when such precision is unnecessary
That is not performance.
Your definition of mod performance is wrong
You have no idea what you're talking about.
dismissed. back to politics
again. Show a place where that actually applies.
You get shot but because other Mods and crappy Missions are shitting all over the scheduler you only get unconcious 20 seconds later.
Would you call that good performance?
It's true. ACE and CBA are doing work. Work needs time to be done.
If you run more Programs you have higher CPU load.
Your definition of mod performance is not performance. You are babbling nonsense as usual. Stick to politics.
No it doesn't.
You throw a granade. It explodes. for 5 seconds nothing happens. Suddenly shrapnels fly all around you.
Another example
Nametags. Would you like it if Nametags only update every 5 seconds?
ACE relies on CBA PFH. And that doesn't run every frame if you don't want it to
Name on example that shouldn't run every frame?
Refuiling a truck. It takes over a minute instead of 5 seconds if you put it in scheduled because the scheduler is overfilled
That's not a good playing experience
You're making shit up, because you have no actual facts.
You just say what suits your feelings.
Stick to politics. That is opnion based.
It's better suited for you.
It's true that using ACE lowers FPS. Because there is soooo much more stuff that is done. But you can't actually give any examples on how to improve that
If there is plenty you have to know atleast one