|
Post by mro on Dec 9, 2009 6:07:47 GMT -8
Okay, after deep study I made two DShK weapons: one is the AA_gun totally rebuilt and now working (the AA, in VC and VC2 among vehicles, actually is the Degtyaryova Shpagina Heavy Machine Gun in quad as Anti Aircraft) other is the DShK single on tripod I made the two mounted weapons either for VC1 and VC2, making all details, scripts really working for VC and VC2, textures, 3D (bes).. I just need to conclude some small details but what is important is that tehy work properly. Tested in a real multiplayer map: VC1 works perfectly VC2 has some small bugs, but at the end I made them WORKING!!! just need to understand some small points and for this ask your help. In VC2 you can put the MWP in a map and make it working, shooting perfectly.. just it works for 20 minutes, then crashes. If couldn't apply in a real map it should have been very bad.. but I can and works for long time: so it means we are on the right way and we HAVE A GOOD STARTING POINT TO UNDERSTAND HOW IT WORKS AND HOW TO FIX
THE MAIN VC2 PROBLEM IS AN ALERT, WHICH COMES WHEN YOU CLOSE YOUR GAME TEST, AND ALSO COMES WHEN YOU FINALIZE A NEW MAP
Title "Ptero-Engine-3: Message" Alert "c_GM_mwps::Release() some unreleased mwps found"
I IGNORE THIS ALERT AND PROCEED.. BUT FOR SURE THIS MEANS THAT SOMETHING IS NOT CORRECT, AND THE ENGINE FINDS SOMETHING WHICH AFTER TIME CRASHES
In scripts I've done a lot of good discovers, also for VC2: for one important point I had also the help of Ando: we deeply thought in two how to overcome a new line, and "Bingo!".. now I must understand how to solve this part of script: for sure there is something I must add: there are several extarnel void, like for example "MWP info": most probably once I will be able to add this void "MWP info" I will give to engine the info and the alert will not appear.. or there is something in INI (not in WEAP.TXT, already tested all) or in DEFS for which the new MWP's are accepted..
Fist Bravo is an addon: in this addon there is something for which the new weapons are accepted as "released" but WHAT?? this is what I'm studying
who tries to help me? I can send all material for your test
|
|
|
Post by Chavez on Dec 11, 2009 16:35:34 GMT -8
c_GM_mwps::Release() Release() is a function of c_GM_mwps ... and falls within its scope you would have to see what parameters are being passed to get the error to go away...is it asking for an int, two ints, an int and a char, Also, congratulations on your accomplishments with the VC1 and VC2 mounted weapons -Rick
|
|
|
Post by mro on Dec 28, 2009 17:44:07 GMT -8
as I wrote you in PM
thank You Rick
first of all BEST WISHES FOR Christmas and HAPPY NEW YEAR to You and Family
I solved the script and works the only real problem I find is the alert which appears c_GM unreleased mwps found which means that if I don't find WHERE to make VC2 regognize the new mounted weapon all my success is just wasted time
I tested two new my MWP's on a real map and they work for this all guys are happy because (even with my very poor experience in scripting) with this result we reached the target: a new item and its script is possible in VC2
unluckily it's not a real win because the mwp works for few time, then the game crashes... just a good starting to understand, but if we don't solve the alert something makes slow or troubles in the map
it is not in EXE for sure: Fist Bravo is an addon with new MWP's and just contains some new info in defs.. but DOES NOT CHANGE THE EXECUTABLE OF VC2.. this means new weapons are not codified in EXE.. this is good but not enough to understand
solutions: in scripting: in global_h there is an external void about "release" of MWP or in defs (definitions): really don't know where to put my hands
I also reached the target changing the ini and the weap: added new "101" weapon and its bullets in weap.txt... it works properly
a very deep reasearch but not complete due to the BAD ALERT: this alert appears when you test the game in editor: F8 and F9 okay, you use the weapon, then when you close (F8) appears the alert window also in finalizing the map: works, works and appears the alert.. you proceed and the map is ready.. works for ten minutes then crashes
my MWP's the DShK AA (anti aircraft) quad mounted (totally changed from the original AA gun the single DShK on tripod they're wonderful I send you by mail attachment tell me which email
I REALLY DON'T UNDERSTAND WHAT YOU MEAN IN YOUR EXPLANATION PLS REPEAT SLOWLY I'M STILL NEWBIE IN SCRIPTING
|
|
|
Post by Chavez on Dec 28, 2009 19:31:31 GMT -8
c_GM_mwps::Release()
Release() is a function and is utilized by the c_GM_mwps (which means Relase() falls within this variables scope)...
You weapon might need to be initialized by the script, then call the Release() function to clear any memory allocations it used...
-Rick (Chavez_US)
|
|
ando
Sergeant
Posts: 31
|
Post by ando on Dec 29, 2009 6:32:18 GMT -8
Good point Rick MRO you must add one line under SC_OBJ_MSG_RELEASE: like that: ... case SC_OBJ_MSG_RELEASE: SC_MWP_Remove(info->master_nod);
.... or maybe it must be "sc_nod" of object in *.bes. then use ... case SC_OBJ_MSG_RELEASE: SC_MWP_Remove(SC_NOD_Get(info->master_nod,"your nod name"));
.... of course you must fix the: "your nod name"
|
|
|
Post by mro on Jan 1, 2010 10:40:08 GMT -8
Thank You Ricky and Thank You Ando ANDO IS MY PARTNER IN THESE SCRIPTS: HIS HELP IS SOLVING A COUPLE OF POINTS WAS TOPIC IMPORTANCE: IN FACT IN HEADERS OF SCRIPTS I WROTE "SCRIPT BY MRO AND ANDO"
TRY... MEANWHILE PLEASE PLEASE PLEASE GIVE ME A LINK WHERE I CAN SEND TO RICK AND ANDO THE TWO MWP SO WE CAN TEST.. DON'T TELL ME ON PUBLIC WEB SINCE THEY STILL MUST BE FIXED IN THESE SMALL POINTS
|
|
Zybero
Staff Sergeant
Posts: 81
|
Post by Zybero on Jan 1, 2010 12:40:38 GMT -8
|
|
|
Post by mro on Jan 1, 2010 14:51:14 GMT -8
Ando & Rick: G R E A T !!!!!!!!!!!!!!!! IT WORKS!!!!!! I was using SC_MWP_Remove(info->master_nod); on a line apart now put with case SC_OBJ_MSG_RELEASE: and cancelled "break" It works.
Zybero: yes, I use always Megaupload: I will upload there and send all of You PM with cosde: don't want to be used from other paties until finished.. only you Rick and Ando until tested
|
|
|
Post by Chavez on Jan 3, 2010 8:14:16 GMT -8
Thats awesome!....In my programming classes, i have done that a few times to make a program function properly. Funny thing is i had no idea where a line of script went until i moved it around a few times and finally it compiled correctly and the program worked....lol
Rick
|
|
|
Post by mro on Jan 3, 2010 10:10:22 GMT -8
Tonight I upload all: DShK single, DShK AA remade, DShK AA totally new, incl scripts and working in maps too!! Still pending points (but now I hope we'll solve all together):
1) in VC2 MWP effects (PTC, smoke, flyoffcartridge) do not work: it is because in def part of the program there are not these functions for MWP (only for normal weapons).. in fact no one official (Besa, M2cal59, etc..) have these effects working
2) light linked to the mounted gun Anti Aircraft spot, as explained (hope that Ando can make a script about that to add) 3) a real pity: in quadruple AA gun the firing ratio was too fast (of course: the parameters are in weap.txt and if you moltiply per four guns in same weapon it is 400% fast: too much) The only one "standard solution is to use the parameters of M2cal50 which is double: this means that you can reduce firing ratio from 400% to 200%, because M2 is double mounted).. ... After long study, last month I was able to add in INI folder (extern one) a new weap.txt: exactly like you do for VC_coop, and for all rest we normally add in extern INI folder: in this way (several day of study) I created some new MWP and their bullets, power and all parameters... also created a quadruple MWP firing at same firing ratio of real DShK.. it was fantastic resylt!! ... But my satisfaction felt down when I realised that this INI works only in test: I really don't know why, but in maps it takes the inside INI\weap.txt.. and with the new weap.txt it doesn't work (MWP doesn't appear in the map at all).. I must improve this point, because once I will make the new weap.txt working result will be wanderful.
4) I also created new DShK real sounds (great sounds with eco!) but the program crashes due to some other snd lists in DEF and INI folders... another point to improve.
5) last point is a stupid and small detail: AA gun has a seat: with entry dummy you make the gunner enter on the tower.. but cause of the collision of the seat, once the gunner dismount he is "locked" because his exit is in same entry dummy and it collides with legs between the iron of the chair and rest of the gun system.. so at the moment you can only make him seat down, then cannot go out (only killing himself :-(..). To overcome the VC2 developers made the AA gun "without collision" so gunner doesn't find the chair as obstacle to go out.. BUT IT IS VERY BAD!! In scripts there is a sort of dummy "pos" which is commonly used for vehicles: entry to enter and pos to shom driver the way to go out.. and other solutions which I'm still studying..
Let's cooperate to conclude this step: think that once we made some new objects perfectly working in all parts we opened the new way to make all what we wish with VC2.
|
|
|
Post by mro on Jan 12, 2010 14:01:03 GMT -8
I already concluded and in couple of dd ready to send you new MWP's (four) and other items. But before I need to solve the following points, which are important to really complete all. In script system, many points are very similar between VC1 and VC2, and I learnt to study from VC1 SDK, then deeply cross check between sc_global.h VC1 first / then compare with sc_global.h of VC2.. this is the method I'm using.
So please try your best to reply to some of following questions: ____________________________________________________
Theme 1: MWP 3PV anim different from standard.
In "s_SC_MWP_Create;" there is only the chance to use the line "char *anim_dir;", which must be just the three "center, up and down.stg" otherwise it doesn't work.
But I have to add to some MWP different 3PV anim, which aren't the above three standard shooting positions: for example I made some cannons, and I have (already existing in VC1 and VC2) the correct "*.stg" for these. Since they aren't "up,center and down" I cannot use with standard "MWP_Create" structure: I have to add something to add and change anim.
I tried to consider mounted weapon as a vehicle, adding the vehicle entry strctures ("EntryAdd" for VC1 and "VehicleSeatInit"): follows the VC2 system structure as example.
typedef struct{ dword type; dword flags; dword dstr_dead; dword name_nr; sc_nod mwp_nod; char *pos_nod; char *entry_nod; char *viewpos; float rx_min,rx_max; float rz_min,rz_max; char *anim_enter; char *anim_leave; char *anim_stativ; char *anim_shoot_up; char *anim_shoot_middle; char *anim_shoot_down; char *anim_dead; char *watch3pv_nod; c_Vector3 watch3pv_vec; float overturn_kill_z_limit; }s_SC_VehicleSeatInit;
Or I tried to add "s_SC_P_Play3pvAnim;" structure, in VC2 global.h as follows, but the alert requires "which player".
typedef struct{ char *stg_filename; float start_anim_time; float end_anim_time; float begin_interpolate_time; float end_interpolate_time; float weight; BOOL disable_hit_anim; dword callback_id; float callback_timetoend; }s_SC_P_Play3pvAnim;
Or which other struct do I use? weap (normal weapons) has a lot of anim lines, but I guess I cannot mix MWP with weap: or do I?
Specific questions: - is it possible to add a typedef struct's "CarEntryAdd" (VC1) or "VehicleSeat" (VC2) without creating the car? or do I need to create a car to use them? - is it possible to use a part of standard weap structure? - or, is it correct to use Play3pvAnim and how to tell the player in script?
Note: the seat in car system could be useful also for player to exit the MWP when "locked for collision problems" (example in AA_gun it seats on chair, but then cannot exit: locked by chair collision).
Theme 2: sound of effect.
Always in new MWP I need to add new sounds: I tried to add in SND2 folder, then change the txt files adding the new weapons, but it is very complicated and involves a lot of points in Vietcong structure.. better to avoid if possible.. Only if possible (otherwise already prepared new SND2 full modification) I wish to use a struct inb script to make the specific sound.
Note: if I can add some new anim (theme1) and sound (theme2) it could be easy to make the new MWP, putting anim and sounds in MWP folder and pointing dir's to the folder where there are BES and TEX)..
Theme 3: light.
You told that solution to add a spotlight to AA gun is the struct "Light" which is in global.h: - how ro add the Vector3 of the spot node? mean, how to apply the light script to lighning faces only?
|
|
ando
Sergeant
Posts: 31
|
Post by ando on Jan 13, 2010 12:47:48 GMT -8
I don't know much about sound and animations. Onliest thing I am sure is that vehicle animations are not synchronized in VC1 MP.
Light: By script you can create only omni light ( not spot light ) (VC1 and VC2)
Onliest option is to create spot light in editor and transform it by script.
|
|
|
Post by mro on Jan 21, 2010 6:24:48 GMT -8
Hi all.. I send PM with Megaupload link to Rick, Ando and Zybero. For today they're VC2 only.. tomorrow send also VC1 same 4 new MWP: shooting Mortar, M46_Type59 cannon, DShK single HMG (my totally new) and DShKAA (the AntiAircraft which I totally remade) Pls download and tell me : tested in maps and they work I want to send also my new WEAP.TXT and Sounds.. WEAP.TXT placed in INI works well
AA: I invented a new strange solution to overcome the collision problem with gunner: as told the player enters the weapon tower but cannot leave it because "locked" by the weapon metal collision.. after tried in many ways to change script parameters (entry activation range), I made some parts without collision linked to entry, and then linked their copies named ^S, ^S, etc without texture and only collision.. so the player doesn't find obstacles, but meanwhile there is the meatl collision. It works, but at the moment the ^S invisible objects do not rotate properly even if correctly linked in hyerarchy.. still studying
|
|
|
Post by mro on Jan 21, 2010 6:29:20 GMT -8
|
|
|
Post by mro on Jan 22, 2010 2:16:16 GMT -8
and now sent PM with VC1 new MWP same 3 PM any comment?
|
|