Cantina Halcones Rojos

Acceso Público => HR Codwar => HRCodWar, english speaking community => Mensaje iniciado por: 3./JG51_Stecher en agosto 15, 2014, 12:30:02 am

Título: Many Questions
Publicado por: 3./JG51_Stecher en agosto 15, 2014, 12:30:02 am
Hi, I am part of the Ghost Skies team that is looking to put together a campaign for CLOD.  We have been very impressed with your campaign system, and have been learning and testing things with it for a little while now.  We're coming from a dynamic campaign for the old IL-2 that allowed the use of moving columns during the mission.  From what we can see so far, HRCodWar supports only static tanks, trucks, etc, not moving ones.  They can be repositioned between missions, but nothing is actually driving around during gameplay.  I just want to confirm that this is correct.  And if so, would you guys consider adding support for live moving units during a mission?  In our old campaign we found that this feature greatly added to the dynamic aspect of each mission and made the interaction between air and ground forces a lot more fun, seeing the world alive.  Do you think it would be worth doing?
Título: Re:Moving Unit Support
Publicado por: Grainovich en agosto 15, 2014, 01:11:53 am
Hi Stecher , welcome to our forum and thanks for your words ;)

Yes, you are right, we would like movable units too, moving units will make the campaign more immersive and realistic, but we have a main problem, a problem in the CLOD artificial intelligence units. I don´t know If you used the CLOD full editor and observed the units behavior across the field... and the problem of the bridges and rivers mainly.

CLOD, in some features, it is an unfinished simulator, and the IA units it's one. You can see a unit blocked on a telephone post or hitting a house corner without forward, and arriving to a river and crossing it above water like a messias or falling down deeper... and the bridges!! the nemesis of the units, when a unit try to cross a bridge only 10% of the times will be success, usually is blocked on the beginning of the bridge and goodbye, it's a nightmare!!

For all these strange behaviour, we were obliged to take the decision of use only statics units, because the units will never follow the waypoints marked.

Sorry for my awful english, do you understand me?  ;)


Título: Re:Moving Unit Support
Publicado por: 3./JG51_Stecher en agosto 17, 2014, 06:12:54 am
Thanks.  I hadn't tried with the bridges before, only on roads.  I see what you mean now.  They get stuck, and even kill themselves in the river sometimes.  That's too bad, but I understand the need to only use static tanks, trucks, etc.  What do you think about ships though?  Since they don't have to deal with those problems, maybe they would work better, just going directly between 2 waypoints in the open water.

Also, I was hoping you could clarify what counts towards a team unit when calculating the captures of assets.  Does everything a team can have count equally toward the 2:1 ratio?  Tanks, cars, AA guns, AT guns, artillery, etc.  How about supply columns, do they count the same when figuring the capturing/defending groups?
Título: Re:Moving Unit Support
Publicado por: Grainovich en agosto 18, 2014, 08:39:59 am
Yes!, you are right again! , ships can sail free from point A to point B, theoretically this feature can be implemented, but it's logic?? if all units can't move? do the ships should do it?

When we planned the campaign system, we thought If all units can´t move .. the ships too, not exists units in movement in the campaign, and thankful to this static feature, the implementation (internal programming side) is more standard and easy and we needed less time to get this feature ready ;)

Conquer resources... ok, the resources can be conquering are: Factories, refineries, power plants and bases.
All resource have a coordinates ok?, so, If at the end (this is important... the calculate is made at the end of the mission) of the mission a side have 2:1 (at least) of units (each unit count like one unit) around (2000 meters) their coordinate, the resource has been conquered.

The proportion and distance are:

conf.ini

metros_conquista = 2000  -> Distance
proporcion_conquista = 2  -> Porpotion (ratio)

I explain myself? ;)
Título: Re:Moving Unit Support
Publicado por: 3./JG51_Stecher en agosto 19, 2014, 05:02:22 am
I guess my thinking is if you can't have them all moving, it may be worth doing the ones you can, rather than none.  But I understand being consistent streamlines the code.

Thanks for the capture confirmation.  I just wanted to make sure that a tank wasn't worth 2X a gun or something like that.

We ran our first full length mission test last night, and I'm still learning plenty from the manual, which is a huge help by the way.  Thank you for including it. ;)  We were trying to do open field rescues of ditched pilots.  Can you confirm, is it correct that you can only rescue a player that is from the same type of aircraft?  Stuka to Stuka worked, 110 to 110 worked, 111 to 111 worked, even if it was a different variant of the same type.  But if a 109 pilot tries to be rescued by a Stuka, it's telling us that there aren't any open seats, even though it does have 2 seats of course.  I don't suppose there is a way of making that situation work.  Are single seater pilots just not able to be rescued?
Título: Re:Moving Unit Support
Publicado por: Naglfar en agosto 19, 2014, 11:07:03 am
We ran our first full length mission test last night, and I'm still learning plenty from the manual, which is a huge help by the way.  Thank you for including it. ;)  We were trying to do open field rescues of ditched pilots.  Can you confirm, is it correct that you can only rescue a player that is from the same type of aircraft?  Stuka to Stuka worked, 110 to 110 worked, 111 to 111 worked, even if it was a different variant of the same type.  But if a 109 pilot tries to be rescued by a Stuka, it's telling us that there aren't any open seats, even though it does have 2 seats of course.  I don't suppose there is a way of making that situation work.  Are single seater pilots just not able to be rescued?

Are you sure you are not trying to rescue the Stuka pilot by the 109?

From the manual:

Cita
>RESCUE PILOT_NICKNAME. Tries to get you into the airplane manned by PILOTNICKNAME. Used to rescue downed pilots behind the enemy lines. Ex: >rescue hr_colibri

In your case, the 109 pilot should use ">rescue stuka_nickname".

Despite the command name you're not trying to rescue that pilot, you're asking that pilot to rescue you.
Título: Re:Moving Unit Support
Publicado por: Grainovich en agosto 19, 2014, 04:16:39 pm
Naglfar's explanation is right! ;)

A tip: You can try this in the own base, you and your comrade can create a 109 and stuka in the same base and go closer to each other, not need takeoff and ditch in the middle of the fields, technically, the player is moved from one airplane to another, doesnt matter "where", you know?

And remember to make the rescue more easy: http://www.halconesrojos.com/hrcodwar/en/conf-ini-reference (http://www.halconesrojos.com/hrcodwar/en/conf-ini-reference)

metros_rango_rescate: Minimum distance in meters at which both crafts must be located in order a rescue to happen.

You can increase this value.
Título: Re:Moving Unit Support
Publicado por: 3./JG51_Stecher en agosto 21, 2014, 05:29:59 am
Yeah, we actually did that a few times at first, with the rescuer typing in the message.  But after it responded with "no empty seat" on the 109, we figured out we were backwards.  So we had the 109 do the message with the Stuka pilot name.  It also returned the "no empty seat" denial.  We were confused and were actually doing something else while both on the airfield and I accidentally recalled that message in my chat and I wound up in the other guy's plane.  We were both Stukas.  We tried 110/110, 111/111, and they worked, so we figured it was a plane type match requirement.  But last night I tried again as a 109 with a Stuka rescuer.  And I swear we did the exact same thing as before, but this time it worked.  In both instances, we were about 10-15m apart.  Nowhere close to the 100m limit.  I asked the Stuka pilot if he had chocks set, and he said yes.  I am trying to find out if the guy from the first Stuka attempt (different person) had chocks in or not.  I know there is a speed required to be recognized as stopped. I believe it's at 1.  He was, at the very least, stopped with brakes, but not sure about chocks.  Is there an actual chocks requirement, or maybe he was just getting pushed the slightest bit by the wind while on brakes.  I don't know, from my 109 viewpoint, the situations looked identical.  The first one didn't work, the second one did.  We'll do more testing to see if we get it every time.  It's a great feature, and I'm glad to see it working for single seaters in trouble. :)
Título: Re:Moving Unit Support
Publicado por: Grainovich en agosto 21, 2014, 08:23:54 am
No, no chocks is needed... only the aircraft stop (speed <=1 like you said) and you can stay with engines on... mmm.. it's weird.

We programed this feature thinking about rescue of fight pilots, mainly have to work with singles seaters ;D

About how the system calculate an aircraft is stopped, it's about his low speed, like you said:

http://www.halconesrojos.com/hrcodwar/en/conf-ini-reference (http://www.halconesrojos.com/hrcodwar/en/conf-ini-reference)

velocidad_maxima_aparato_parado: Maximum velocity at which a craft will be considered as "stopped", and consequently allowed to perform certain tasks, as load and unload.

Often, an aircraft is stopped on hill with slope falling down and you have the engine stop but the aircraft is moving ... for this reason we "played" with a low velocity to consider stopped ;)

Please, if you find out a potential bug, we are glad to hear you, tell us ;)
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en agosto 22, 2014, 10:32:57 am
I'll be trying many more rescues in our next test session and will let you know if any of them don't work as expected.

One thing that's been giving us problems is how an abandoned plane is acting.  We saw it when we did the rescue tests on the airfield, and the plane being left was in perfect working condition.  This should normally not come up during a mission.  However, we also see it when someone, who has landed, or not taken off yet, simply hits Esc and then creates a new plane.  I know the appropriate way to get a new plane is to hit Esc, then click on your flag, click OK, and then create a new plane.  And your script handles this very well, getting rid of the old plane in just a few seconds.  But when you don't do the flag/OK step, and just create another plane, an AI pilot takes over the plane, taxis around, takes off, flies circles, and often just crashes the plane.  As much as we will tell people to dispose of their plane properly, we know there will be people that won't get the message, or will forget.  Is there a way of making the other plane simply disappear quickly instead of becoming an AI and flying around, when someone creates two aircraft?

On the ATAG server, they seem to have something that works for this situation, and prevents the plane from being flown by an AI.  But I don't know if it would work with the rest of your script, or if it would need a different code entry.  If it helps at all, here's the console with the debugs enabled for this sequence of events.

(http://www.ghostskies.com/aitakeover.bmp)
Título: Re:Many Questions
Publicado por: Grainovich en agosto 22, 2014, 06:33:25 pm
Thanks for the report Stecher.

As you know, there is only two correct ways to leave your aircraft, like you said.

1 - Press ESC > Hit on flag -> Exit
2 - Write on chat, >exit

This is explained in FAQs and campaign manual (http://www.halconesrojos.com/hrcodwar/en/faqs (http://www.halconesrojos.com/hrcodwar/en/faqs)).

Now, you report to me an error when pilot has forgotten exit the airplane by those two ways and the IA take control of the plane, it's right?

Some pilots have reported the same bug in the last campaign, but not only when the pilot forget exit properly from the aircraft , the bug is aleatory, I don´t know why, we must not forget the cruel reality, it's a unfinished product, you know.

Normally, the aircraft of the bug report was the BF 110.

On the latest stages of the campaign I modified the script with several changes for "destroy an aircraft unused".

1 - If the airplane is flying, the script damages the most important flight systems of the aircraft and after a few seconds, the tank fuel will exploit.
2 - If the airplane is stopped or not made takeoff (the bug case), the script run 2 tasks.
 2.1 - Try to destroy and disappear the aircraft by a call to API CLOD, it's impossible to know if this action will be successfully (the origin of the bug)
 2.2 - The script damages the most important flight systems, so the aircraft is innoperative.

So, when the IA takes the control of the aircraft and the API CLOD fails, the IA takes the control of the an inoperative aircraft and can not do anything, in this scenario, the own system of the game (not HRCODWAR... the game itself) remove the aircraft after a few seconds, but don´t worry, the system (HRCODWAR) counts the aircraft like return and safe in base with no extra damage.

So, the point is?, Why the bug is happening to you?

I think you have an old version of the script, please download it again: https://docs.google.com/file/d/0B1DB9LptvEJ-cUd6bXh2WTE3N2M/edit?pli=1 (https://docs.google.com/file/d/0B1DB9LptvEJ-cUd6bXh2WTE3N2M/edit?pli=1)

Don´t worry about the number version, 3.41 , I do not increase the version number  :tillo: :tillo: , I'm sorry,

Replace and overwrite in your HRCODWAR machine server this files.

hrcodwar.cs
lang/es.json
lang/en.json

And in your HRCODWAR website replace the translate files es.json and en.json with the new files (must be the same)

lang_mis/es.json
lang_mis/en.json

Try again and tell us ;)
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en agosto 23, 2014, 06:16:47 am
Just tried it with the new files.  Unfortunately the same problem.  The AI takes over, taxis, takes off, flies around, etc.
Título: Re:Many Questions
Publicado por: Grainovich en agosto 23, 2014, 08:29:44 am
Really??  :o ... this is so weird.. ok ok, I will try myself.

Please Stecher, say me, the bug run with any aircraft?, or only with 110? 109?? ... this is important, thanks ;)
Título: Re:Many Questions
Publicado por: Grainovich en agosto 24, 2014, 08:47:05 pm
dammit!!! you are right!! how is possible!!??  :tasea:
Título: Re:Many Questions
Publicado por: Grainovich en agosto 24, 2014, 10:43:19 pm
Ok Stecher, it's fixed ... I believe :M8:

Download again please, https://docs.google.com/file/d/0B1DB9LptvEJ-UXNIZ3dyR2laV28/edit

In your case, replace only hrcodwar.cs file.

This is very strange, we believed tested all combinations but it's obviously we didn't.

Thanks for your testing and help, please let us to know if is all ok ;)
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en agosto 25, 2014, 12:15:51 am
I think that fixed it.  When I try to spawn a second aircraft without the flag/OK step, it doesn't leave anything behind.  Nice job, thank you.
Título: Re:Many Questions
Publicado por: Grainovich en agosto 25, 2014, 07:47:23 am
You are welcome ;)
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en agosto 27, 2014, 11:15:54 am
We may have more issues here, and/or some confusion.

Occasionally, people who bail out over enemy territory are getting both captured and escaping messages.  I'm assuming this is not intentional.  It enforces the capture penalty, even though it credited an escape as well.  We had at least 15 bail outs, and 4 of them received both messages.  The rest got one or the other, and it was roughly an even split.  Then we had everyone do a couple of ditches in enemy territory, and there wasn't a single instance of getting both escaping and capturing messages.  Everyone got either one, and again, it was a roughly even split.  For all of these, we were about 20km behind enemy lines, and about 25km from the closest friendly ground units.  Maybe it was just not a large enough sample, but with similar tests, we had 4 double messages while bailing and none while ditching.  Could it perhaps be running the escape/capture process for both the pilot and the plane individually?  When you ditch, you and the plane are together, one entity.  When you bail out, you become two entities, and I'm thinking that might be what's happening.  One of them escapes and the other one gets captured, causing the problem with getting both messages.  That's all I could think of, what do you think?

The other issue is with the scoring.  Hopefully just a lack of understanding.  Can you please confirm that there are no points awarded for destroying enemy planes, tanks, guns, etc.  You get points for destroying enemy structural assests, or for capturing them.  However, there is a huge difference between the sum of the squad scores and the team score.  It is said in the manual that when a pilot dies, the other team gets points.  I assume this is responsible for all the extra points that the team winds up with, which are not being credited to any squad.  Is this right?  Can you please specify how many points a dead pilot is worth to the opposing team?  Are there also similar points awarded for a pilot being captured?  If not, could there be?  Are these configurable?   Many questions, and probably more to come. ;D  Thanks for your time.
Título: Re:Many Questions
Publicado por: Grainovich en agosto 27, 2014, 04:11:56 pm
wow! ;D , don´t worry, just let me time to translate and understand your questions!   ;D

Ok Stecher, it's easy ;D , now... i need time to translate my answers  ;D
Título: Re:Many Questions
Publicado por: Grainovich en agosto 28, 2014, 05:40:29 pm
Ok, let's go!

First, let me explain about process triggered when a player leaves a ditched aircraft or bailout.

The aircraft is close to a friendly base (if is ditched)? ("close" is below of metros_rango_base meters http://www.halconesrojos.com/hrcodwar/en/conf-ini-reference (http://www.halconesrojos.com/hrcodwar/en/conf-ini-reference))

Yes: The plane will be re inventory in that base and the pilot return to that base, he can fly immediately.

No: The aircraft is abandoned and is unrecoverable, now we need focus in the pilot destiny, so, next question.

Where is the pilot (ditched or bailout)?, is over friendly territory?

Yes: Ok, no problem, friendly troops will rescue the pilot and return to home safely, the pilot can fly immediately.

No: Oh oh!! The pilot can be in troubles!!, now we need to focus in the coordinates and how is so far into enemy lines, so... next "stage".

The probabilities and the luck

Now, the system have a lot of work to do, in first place, calculate the kilómeters behind enemy lines and convert it in sectors.
If the pilot is inside of one sector to the frontier, has 80% probabilities of escape and avoid the capture and interrogation, If the pilot is over two sectors of the frontier has a 60%, If is over three sectors has 40% , and next until 5 sectors and followings, where the pilot has a great trouble because has near to 0% possibilities of escape avoiding capture/interrogation :D
The system makes the calculate, a random number between 0 to 100 and if the number is below the probabilities calculated (have you ever played to RPGs?) the pilot is lucky and escapes avoiding his capture, in this scenario, the pilot can fly immediately.
But... if the pilot is not lucky... has a last chance!. The system calculates the number of units friendly and enemy troops around his position ("around" is metros_rango_unidades_captura_piloto meters http://www.halconesrojos.com/hrcodwar/en/conf-ini-reference (http://www.halconesrojos.com/hrcodwar/en/conf-ini-reference)), and If the numbers of friendly troops is upper than enemy troops, the pilot is rescued, and again, the pilot can fly immediately.

If all fails, the pilot is captured and tortured, and he will confess information about his side, the information is aleatory and can be the position of one ship or one factory for example or the kilos of fuel in his base... in this scenario, the pilot is punished and ban a few seconds ("a few" is segundos_penalizado_medio seconds http://www.halconesrojos.com/hrcodwar/en/conf-ini-reference (http://www.halconesrojos.com/hrcodwar/en/conf-ini-reference)) out the game.

In the last scenario, the event is: "Having suffered severe injuries on his dental structure, he manages to escape and swears that he doesn't remember a thing.". This is important, the pilot ALWAYS escapes, because after the seconds of ban, he can enter again to the campaign and fly again.

Always scapes, but in the worst case, is captured and tortured :D , normally, when a pilot is ditched or bail out, the system generates a few events to describe this scenario, his aircraft is abandoned or crash, the pilot jump, is capturing, etc, etc... but all is referred to the same situation.

You have to assume, that two similar situation can end with different solutions, two pilots can ditched on the same sector but one has more luck than the other and escape without problems.

All is a little more clear for you, Stecher?

Next post, the score!
Título: Re:Many Questions
Publicado por: Grainovich en agosto 28, 2014, 06:08:10 pm
Score system... ok.

HRCODWAR is a system that penalizes how bad is the other side, how does it?, easy.

For example, If I'm taking off and I have an accident and the aircraft explode (notice this is important.. explode! destroyed at all!) and I dead , the system adds the score of my life and my aircraft to another side (in general because none enemies squads is the guilty of my uselessness :D). Another example, If I'm drunk and confused, and bomb a friendly factory, the value of the factory is added to the enemy side score, you know?

Now, If i'm on a dogfight with an enemy, and I kill the enemy pilot, the value of the pilot is added to my squad score, and obviously to my side score, if a tank (of my squad) attacks and destroys "something", the value of that "something" is added to the score of my squad, because, "something" of one squad attacks and destroy anything, and the system knows who is the guilty (the squad origin) of the attack. If are more than one squadron involved in the attack, the value is divided by the number of participants and added to each squad.

This is the reason that your score calculated don't is exactly the sum of your squads scores, because the system has added the "fails" of the another band.

So, where is this values?, how much cost the life of a pilot?, and conquer a shipyard? for example...

It's easy :D , http://www.halconesrojos.com/hrcodwar/en/current-configuration (http://www.halconesrojos.com/hrcodwar/en/current-configuration) , in the General Score tab, thats values is the file puntos.json inside hrcodwar/datos_sistema in your HRCODWAR steam server :)

Typically, many of them match with their cost of creation, others that referred to events like conquers is arbitrary, like a life pilot value or capture, piloto and piloto_capturado.

Any doubts? ;D
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 03, 2014, 08:08:55 am
Okay, that clears up a lot, thank you.  Great information on the actual chances for escape based on distance to front, and the scoring breakdown.  After a couple more nights with our testing group, I still have a few questions though.  And a definite bug to report.

I now understand the process of either escaping or getting captured, but I'm still not sure we are understanding each other on the issue of getting both messages, at the same time.  You said that every pilot who is captured is considered to escape eventually, and can fly after their capture ban is over.  In this situation, we would still only have the capture message, correct?  Even if they are captured, and eventually are considered to escape, we should only be actually seeing the capture message for that pilot, yes or no?  Because what we are seeing is both the capture and escape messages, given simultaneously.  Same event, same pilot, same exact moment, both capture and escape messages together, not one or the other.  So far it only happens on some of the bail outs, over enemy territory of course.  We have never seen it for a ditch in enemy territory.  Ditching always results in either one of them, capture or escape, but never both, as sometimes is happening with bailing out.

If a captured pilot, who is considered captured, but eventually gets to escape, usually gets only the capture message by itself, I don't see why there is an instance of getting both capture and escape messages together from the server.  That's why I worry it is a mistake, where it is running the process twice, and comes up with different results for the same pilot at the same moment.  If I am wrong, and you are aware that it is supposed to be doing this, can you explain why sometimes it gives only the capture message, and sometimes on bailing, it gives both the capture and escape message together?  How are they different, if it is on purpose?




Regarding the scoring, there is a bug with the Beaverette.  It is being used as an individual chief unit, and also as part of the Allied supply columns.  The single chief unit is Beaverette_III, and the piece of the supply column is Tank.Beaverette_III.  The problem seems to be when you kill the individual chief unit, it goes looking for Beaverette_III for scoring, and it finds both of them, since the term "Beaverette_III" is contained within "Tank.Beaverette_III".  You can see in the Report tab in the mission results, that it lists the player as having killed both of them at the same time.  Also, in the Pilots tab of the results, it gives the pilot credit for double of what he actually did.  For example it will list "Destroy: Beaverette_III (2)", and "Confirmed: TANK_37_ALLIED_Chief (2)".  Which is impossible, because there cannot be more than 1 of any single chief unit.  They are all individually numbered.  Adding up the points for the squad and team, also confirms that it counts the single Beaverette twice.  So for every one you kill, you are actually getting double the points that you should be getting.

This does not happen in the reverse situation.  If you are destroying Tank.Beaverette_III from a supply column, it does not give you credit for the other one, as "Tank.Beaverette_III" has the extra Tank prefix, and therefore when looking to score it, the system does not accidentally catch the individual "Beaverette_III".

I guess you could either change one of them for something entirely different, or maybe there is a way of having the scoring system search for an exact term, no more, no less.  Whatever is easier.

And one last question (for now ;)).  Is it intentional or a mistake that planes counted as "Lost" do not score points for the opposing team.  Only when they are counted as "Destroyed" do they give points to the other team.  Even though they are lost permanently either way, I kind of like it this way.  If you ditch (far from an airfield), the plane is gone, but the enemy doesn't get points for it.  If you bail, it crashes and is destroyed, and the enemy gets points.  It gives players an incentive to ditch their plane when they can, instead of just bailing out.  Which I think is a good thing.  Just wondering if that was on purpose.
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 03, 2014, 10:38:29 am
Okay, that clears up a lot, thank you.  Great information on the actual chances for escape based on distance to front, and the scoring breakdown.  After a couple more nights with our testing group, I still have a few questions though.  And a definite bug to report.

I now understand the process of either escaping or getting captured, but I'm still not sure we are understanding each other on the issue of getting both messages, at the same time.  You said that every pilot who is captured is considered to escape eventually, and can fly after their capture ban is over.  In this situation, we would still only have the capture message, correct?  Even if they are captured, and eventually are considered to escape, we should only be actually seeing the capture message for that pilot, yes or no?  Because what we are seeing is both the capture and escape messages, given simultaneously.  Same event, same pilot, same exact moment, both capture and escape messages together, not one or the other.  So far it only happens on some of the bail outs, over enemy territory of course.  We have never seen it for a ditch in enemy territory.  Ditching always results in either one of them, capture or escape, but never both, as sometimes is happening with bailing out.

If a captured pilot, who is considered captured, but eventually gets to escape, usually gets only the capture message by itself, I don't see why there is an instance of getting both capture and escape messages together from the server.  That's why I worry it is a mistake, where it is running the process twice, and comes up with different results for the same pilot at the same moment.  If I am wrong, and you are aware that it is supposed to be doing this, can you explain why sometimes it gives only the capture message, and sometimes on bailing, it gives both the capture and escape message together?  How are they different, if it is on purpose?

can you post the messages in every case?, I guess you referred from briefing page, it's true? , for my it's a bit difficult understand the problem, I need to read this messages for be able to make a "trace" in the system, you know?


Regarding the scoring, there is a bug with the Beaverette.  It is being used as an individual chief unit, and also as part of the Allied supply columns.  The single chief unit is Beaverette_III, and the piece of the supply column is Tank.Beaverette_III.  The problem seems to be when you kill the individual chief unit, it goes looking for Beaverette_III for scoring, and it finds both of them, since the term "Beaverette_III" is contained within "Tank.Beaverette_III".  You can see in the Report tab in the mission results, that it lists the player as having killed both of them at the same time.  Also, in the Pilots tab of the results, it gives the pilot credit for double of what he actually did.  For example it will list "Destroy: Beaverette_III (2)", and "Confirmed: TANK_37_ALLIED_Chief (2)".  Which is impossible, because there cannot be more than 1 of any single chief unit.  They are all individually numbered.  Adding up the points for the squad and team, also confirms that it counts the single Beaverette twice.  So for every one you kill, you are actually getting double the points that you should be getting.

This does not happen in the reverse situation.  If you are destroying Tank.Beaverette_III from a supply column, it does not give you credit for the other one, as "Tank.Beaverette_III" has the extra Tank prefix, and therefore when looking to score it, the system does not accidentally catch the individual "Beaverette_III".

I guess you could either change one of them for something entirely different, or maybe there is a way of having the scoring system search for an exact term, no more, no less.  Whatever is easier.

oh! yes, this seems a bug.. ok, I will check out ;)

And one last question (for now ;)).  Is it intentional or a mistake that planes counted as "Lost" do not score points for the opposing team.  Only when they are counted as "Destroyed" do they give points to the other team.  Even though they are lost permanently either way, I kind of like it this way.  If you ditch (far from an airfield), the plane is gone, but the enemy doesn't get points for it.  If you bail, it crashes and is destroyed, and the enemy gets points.  It gives players an incentive to ditch their plane when they can, instead of just bailing out.  Which I think is a good thing.  Just wondering if that was on purpose.

Yes yes ;D , you are right ;D

It's "our solution" for that common situation. We thought that one pilot must to take care of his aeroplane, If your aircraft is damaged and you need must to return to a base, try to save the aircraft ditching close to a friendly base is more immersive experience than simply bailout, If you fail and ditched far from the base... oh! bad luck .. but the enemy not gain point with your actions, because you tried at least!! :D , now, if you are a lazy pilot and dont care your aircraft.. the enemy gain point by your lazy actions because your aircraft will be destroying.
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 04, 2014, 02:19:14 am
Stecher, the messages we are talking about, are they in-game chat messages visible on the game screen while flying the mission or are you talking about the events writen on the web page report right after the mission end?, in the last case, can you post the report?, thanks!
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 04, 2014, 03:24:23 am
The simultaneous capture and escape messages appear in the in-game chat, and on the post-mission flight report.

Normally, it just gives one or the other.  But occasionally, on bailing out, it gives both at the same time.

Server console, showing it giving me both.  Appears in chat as well.
(http://www.ghostskies.com/escapecapture1.bmp)

Flight Report, showing it with Escape only, Capture only, and both.
(http://www.ghostskies.com/escapecapture2.bmp)
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 04, 2014, 11:33:09 am
I cant believe what is happening to you! :o now, I see why you have so many doubts.

This behaviour is quite weird, this feature was tested very well, you can believe me, we fought two campaign along one year and never saw this.

Please Stecher, I need to trace this process reproducing the bug, I need your files, your configuration, all.

Can you compress your /hrcodwar directory of you CLOD server and send to me to grainovich@gmail.com please?

ps: The next time, is more easy for you if you copy&paste your "C:\Users\<profile_name>\Documents\1C SoftClub\il-2 sturmovik cliffs of dover - MOD\logs.txt", this file contains the chat window content, you can erase before every mission and not confuse to you with data of another session.

Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 07, 2014, 06:06:11 am
Okay, I've sent emailed our server folder over.  FYI, I have made minor modifications to the hrcodwar.cs file making the airfield resource buildings into groups of 12 instead of 4.  And Gunther has redone some of the English version messages in the en.json (and he's doing more).  The issue with getting simultaneous capture/escape messages when bailing sometimes happened before we had made any changes, so I'm sure they're not related.  The conf.ini of course has a few changes to meet our test template files.

We've seen it when bailing out 20-30km behind lines, and maybe on only 1 of 5 tries, rough average.  So you may need a large sample of bail out events to see it.  Procedurally, we bail at low altitude, let the pilot drift down to the ground, then hit escape and click flag/OK.
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 07, 2014, 10:52:44 am
Thanks Stecher!! received it  ;)
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 08, 2014, 12:14:23 pm
Thanks for taking a look.  Sorry if it seem like I'm piling on, but there are a couple other things we keep having trouble with.  I am hoping they are just something simple that I've messed up or don't understand.  That way it's an easy fix. ;)

The orders haven't been processing for a while.  We had them working a few weeks ago, made supply columns, moved units around, etc, but after a campaign reset, they stopped working.  I had reset the files in the same manner a few times before, so I'm not sure of anything I could have done, since they had been working previously before and after other resets.  If you are running tests with our folder, could you please tell me if the commander orders are working for you or not?  That way we know if it's our server forlder, or our website install.  The orders appear to be saving properly from the map interface to the order files.  The game server tries to contact the website to process the orders files, but then it gives a lengthy error, and they do not take effect.  I tried reinstalling parts, but no luck, and I'm out of ideas to try. :-\  Here's the server error when it tries to contact the website for the orders:

(http://www.ghostskies.com/orderserror.bmp)





The other issue is unfortunately still some confusion with the scoring.  Sometimes it adds up perfectly, makes sense with everything that happened in the mission report, and matches the numbers in the puntos.json file.  Other times, it doesn't, and I can't figure out why.  We know of the Beaverette problem counting as double, but even when we avoid the Beaverette, we're getting team scores that end in 3 or 4.  Am I misunderstanding some part of the system?  Everything in the puntos.json ends in a 0 or a 5.  How could we be getting scores that end in 3 or 4?
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 08, 2014, 05:13:33 pm
wow!! nothing is working!! what mess!! ;D

I could not check the above problems still, I need more time.

But I check this last quickly emulating the call to server and response to me ok: {"r":true,"m":2,"datos":{"allied":"","axis":""}}

Remember, all formats files must be in UTF-8 NOBOM , if you edit the hrcodwar.cs or \hrcodwarweb\ajax\services.php, remember save in this format.

About the scores... I guess it is some object not listed in puntos.json , because when an object is destroyed and is not listed in puntos.json , the system add ONE point ... mmm. I need more time Stecher :)
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 10, 2014, 11:17:00 am
The clue on the points being 1 if not in the puntos.json helped us track it down.  Thanks.  After killing many things and checking the score one by one, it wound up being the airfield resource buildings.  They were what was counting as 1 point, and giving us those weird scores.  They are not missing from the puntos.json, but they are mis-named.

This is what they are listed as in the default puntos.json:
"almacen_combustible":100,
"almacen_bombas":100,
"almacen_municion":100,
"almacen_reparacion":100,

But when I eventually checked the eventos.json, after destroying them, they were being called by different names than above.  When I changed the puntos.json to match what the eventos.json was calling them, it fixed it, and they are now scored as 100.  It needed to be this:
"almacen_fuel":100,
"almacen_bombs":100,
"almacen_ammo":100,
"almacen_kits":100,

Is this only an issue when playing with the English version enabled?  Or could this be happening to you guys as well?
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 11, 2014, 08:22:39 am
Well done Stecher!!  :bor:

I'm a fool!! I should not associate the translated name of the building to his score ... but now... I'm remember the reason of it...   :M8:

Yes!, you are right!, this bug appear when the system run another language than spanish, this should be documented...

Anyway, your test group are doing a huge work!! thanks very much!!

The other errors is unchek still, I'm a infernal week, so sorry, as soon as is possible I will check ;)
Título: Re:Many Questions
Publicado por: pingu en septiembre 11, 2014, 10:01:58 am
Hello Stecher,
we really apreciate your effort using our system, we really expect you to have real fun with it. It is great to read that you are improving the translation of this system into english, please make it available to us so we can add it to the "oficial" version. It's something badly needed to finally polish HRCODWAR and spread it into the virtual pilot comunity.

It's a daunting effort to build the full system in spanish at first and then move it to an english version. We built, documented, tested and played the spanish version first, so we found ourselves exhausted when we decided to move it to an english version. Your interest and your questions about HRCODWAR will make of it a better and reliable system.
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 13, 2014, 01:09:10 pm
We certainly appreciate what you guys have done here.  The more we get into it and learn the system, the more impressive it is.  And I have to say, in many of the server messages, we get a good laugh at the personality you put into it, instead of just dull messages. ;D

A few months ago, we were debating what to do with our community, and considered moving from the old IL-2 over to CLOD.  When we came across your project, it was one of the deciding factors to make the jump.  We're lucky you released it at the right time when we were looking for something just like it, or else face the huge task of trying our own from the ground up.  Even more, your willingness to help, and be open to people modifying things (which we're exited to try) is really terrific.  We'd be happy to send over our English files when we think we've got them in a complete state.  We're still going through things as we become exposed to new parts.

Our big road block right now is getting the orders to come through again.  Still not really sure what happened to break that.  We're doing a complete reinstall of everything, and crossing our fingers. ;)
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 13, 2014, 06:37:23 pm
So sorry Stecher, this week has been impossible to me check the another problems, we keep in mind yours questions and I'm on way ;)

stay tuned!  :bor:
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 14, 2014, 04:40:38 am
Not a problem at all.  Thanks for taking a look whenever you can.  We've got plenty to keep busy in the mean time. :)
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 16, 2014, 09:08:05 pm
News!!

About your web communication problem I have reproduced the error, in fact the response of the script:

http://www.ghostskies.com/cod/ajax/services.php (http://www.ghostskies.com/cod/ajax/services.php)

Is not a valid json object, the return data is:

Código: [Seleccionar]
???{"r":true,"m":2,"datos":{"allied":"","axis":""}}
Yes!! with three ? chars on the beginning, this is the problem.

If you have not changed the script and saved with a different format than UTF 8-NOBOM , probably it's a transfer error to server, upload again the script and remember set the transfer like binary, not plain text.

But, If you have changed the script (remember save it in UTF 8-NOBOM format), be sure you don't have any chars after the php tag at the end of file, you know, ?> , the script file (services.php) must end with ?> no more extra chars, because the file return a json object and any extra chars will corrupt the json object, ok? ;)

The typical three ? is a format file error, sure ;)

Well... this was easy ;D, the other errors next days ;)

ps: UTF8 NOBOM format is pretty important because ajax call and json objects working in this format
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 19, 2014, 08:05:10 pm
Unfortunatley, it's not proving to be that simple.  We've checked for extra characters in the services.php (a file we never touched), and it's clean.  We checked the file format for the hrcodwar.cs, and made sure to resave any file we've ever gone into, and confirmed it was in UTF8 w/o BOM format.  Still, we get the same error when it tries to contact the website for the order files.  We cleared out the website and server installs, and completely reinstalled everything on both.  And we're getting the same error.   ???

II./JG1_Spies is the one who hosts our website, and he's said that you guys can have permission to the ftp, if you'd ever consider checking on it for this problem.  We're not sure what else to try. :tillo:
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 19, 2014, 08:23:58 pm
Hi Stecher!!

I'm working on hrcodwar.cs now , I think fixed the "Tank.Beaverette_III" and "Beaverette_III" double point count bug , thanks for your notice ;)

Don´t worry about the web, It will be a silly bug , will be easy to fix.

Ok, go!!,  send me and private message with the FTP data and I will check online on your server, no problem, I will test as soon as I can ;)
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 20, 2014, 08:06:43 am
More news Stecher.

I saw the capture/escape error in a report on our last mission of our last campaign:

13.79   AS4       HurricaneMkI_100oct#j      Aparato destruido
13.81   AS4   CC   CC_rEd69_Jav      Capturado
13.81   AS4   CC   CC_rEd69_Jav      Escapa

About 19 mission with close to 40-50 pilots fighting and no error ... and.. in the last mission appeared the bug, this is incredible because the algorithm not permit the two events at the same time ... it's pretty weird ...

Seems like two servers instance running and the same time and every on did his own calculated...but this is impossible too  :tillo:

Anyway, I keep looking for the origin of the bug, I hope fix it, probably I will release a new version the next days.

I'm awaiting about your ftp data as well.
Título: Re:Many Questions
Publicado por: SG1_Lud en septiembre 20, 2014, 01:28:58 pm
I confirm I detected that "bug" in the statistics tool. Leading to some minor differences in the total balance of the outcome of a sortie.

There are also other strange isolated events like:
* Pilot landing but no take off briefing message. Example pilot E69_Rinuccio in HR CODWAR II.
* the other way around, pilot taking off and no ending record (no death, no captured or escaped, no landing).

But overall this is a minor issue, I've detected so far after 1.800 + lines of briefing parsed, 3-4 cases. I honestly believe this is not a HRCODWAR issue, but COD one.

Good news!
The new statistic tool (excel) has been debugged and improved with all the valuable data of HRCODWAR I and HRCODWAR II. Still a few things to polish, specially with ships, as none of these campaigns was intensive on sea operations. HRCODWAR III will serve to discover new improvements/features to be added when we make embark/disembark ops.

The new version is totally ready in Spanish, and is being translated to english as we speak. But... I have a problem: no english campaign data for testing it thoroughly. I can release it as RC, hoping that you guys can beta test it. Tools needed: Excel 2010, my tool itself, and a working english campaign server. I will support for the setup , first steps and troubleshooting.

You can see the HRCODWAR II stats result processed with this tool here: http://sg1.es/foro/HRCODWAR2stats/ (http://sg1.es/foro/HRCODWAR2stats/) (sorry, it will ask you to register, but it is a pretty straight process)

S!
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 21, 2014, 12:18:14 pm
Thanks Lud for your report.

This bug make me crazy! :'(

wow!! amazing stats!! ;D
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 21, 2014, 08:26:02 pm
Yeah, I'm sure it will be something simple.  That's what makes it so frustrating not finding it, stopping our progress. >:( 
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 21, 2014, 09:17:09 pm
Ok Stecher!! I checked!!

I think the problem is the content types configuration in your web server, we need to put our focus on the mine.types file of the Apache configuration.

You (your server administrator) should check If the line:

application/json json

Is commented or exist, I mean, If is:

#application/json json

Please, uncomment.

application/json json

Because the script:

http://www.ghostskies.com/cod/ajax/services.php (http://www.ghostskies.com/cod/ajax/services.php)

Return a valid json object with the header: Content-type: application/json , but the system (hrcodwar.cs) read a text plain buffer, the content type of the data return is Content-Type: text/html

Probably, the cause of the three questions chars is that.

The PHP script services.php return a valid json object but the Apache return a text/html corrupting the buffer.

Please, check this feature on the Apache configuration before continuing looking for another cause ;)


Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 23, 2014, 01:18:42 am
I checked the mime.types file.  That line is not commented out.  It already looks like:

application/json      json
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 23, 2014, 07:59:46 am
really??  :P ... mmm... this is turning hard... ok! I will continue looking for the problem ;)
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 23, 2014, 08:34:55 am
Fixed!!

Oh my god!!  :tillo: :tillo:

The services.php includes config.inc.php , if this last file contain an extra chars before/after php tag <?php or ?> or isn´t utf8 we have the same problem.

I checked this file and uploaded again, now it works ;)

Please Stecher, disable my FTP access (I don't want this information in my hands ;D), If in the future I need it again, you can enable again ;)
Título: Re:Many Questions
Publicado por: Barripower en septiembre 23, 2014, 09:37:55 am
Congratulations!!  :bor: :bor:
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 24, 2014, 03:56:10 am
That was it!!! :XDDDD: Thank you so much.  Obviously that was one of the files that we had to change so it worked for our website and map, and it was done before we knew about the format.  We must have grabbed the old version and put it into our clean reinstall, which just corrupted it again. :tillo:  Of course it was something stupid.  Again, thank you, we really appreciate your time to help us out.  I'm exited to jump back in and get stuff going!
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 24, 2014, 08:03:52 am
Don't worry about it Stecher , your squad are doing an amazing job testing the campaign system from zero, thanks to you ;)

I'm still looking the capture/escape error , need more time  :tclas:
Título: Re:Many Questions
Publicado por: SG1_Lud en septiembre 24, 2014, 09:05:18 am
I don't know much about precedence orders in C# but if

Código: [Seleccionar]
if (HRCODWAR_PILOTOS[indice_piloto].aparato_actual != null || capturado_final)
is processed in the order that I believe it is, (the OR the lowest precedence) then I can see issues if a pilot bails out in out of war zone (FZG) very close to friendly land or units?

Can you double chek that Grainovich?

Título: Re:Many Questions
Publicado por: Grainovich en septiembre 24, 2014, 01:25:23 pm
mmm.. at this moment... I don´t know Lud ;D , I need check it, thanks ;)
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 30, 2014, 01:04:26 am
One more small mistake to report.  The Flak30_Shield is missing from the velocidades.json.  You can still move them with manually typed orders, but the "drag and drop" map interface is broken for them.  Without the sector limit, it seems to default to 1 sector as a fail safe, while its Allied counterpart gets 2 sectors.
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en septiembre 30, 2014, 03:03:35 am
When entering move orders for "aaas", it also moves artillery type units.  If moving aaa and artillery out of the same sector, into different sectors, the artillery must be listed first, or else it gets caught up in the aaa order.
Título: Re:Many Questions
Publicado por: Grainovich en septiembre 30, 2014, 08:28:12 am
oops!! you are right Stecher, we missing Flak30_Shield on velocidades.json  :tillo: , thanks!!

About the "aaas" command... do you using the same object to more than one role??, I mean, If you use the same object to light artillery and light aaa when the system moves light artillery search his object and moves it, if you have the same object in aaa will be moving too... you know?
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en octubre 02, 2014, 07:38:17 am
We haven't changed (yet) any of the ground unit assignments.  Your default units are all distinct for light and heavy AAA and artillery, so that's not the issue.  It's doing it for both teams.
Título: Re:Many Questions
Publicado por: Grainovich en octubre 02, 2014, 08:10:43 am
oh oh!  :-\ , bug then... to the fix list !!  :alam:

Thanks for the report Stecher! ;)
Título: Re:Many Questions
Publicado por: Grainovich en octubre 05, 2014, 01:01:32 pm
Hi Stecher!! some news!!

About Bravete error:

Go to eventos_Trata_Unidad_Destruida function , this lines:

Código: [Seleccionar]
                    if ( (actor as AiCart)!=null &&
                         (HRCODWAR_CLASES_CAMIONES.Contains((actor as AiCart).InternalTypeName().Replace("bob:", "")) ||
                          HRCODWAR_CLASES_ELEMENTOS_COLUMNAS.Contains((actor as AiCart).InternalTypeName().Replace("bob:", "")))
                       )
                    {

Must be replace by:

Código: [Seleccionar]
                    if ( (actor as AiCart)!=null &&
                         (HRCODWAR_CLASES_CAMIONES.IndexOf((actor as AiCart).InternalTypeName().Replace("bob:", ""))>-1 ||
                          HRCODWAR_CLASES_ELEMENTOS_COLUMNAS.IndexOf((actor as AiCart).InternalTypeName().Replace("bob:", ""))>-1 )
                       )
                    {

About MOVE AAS error: Yes!! you are right!! as always ;D

Go to chat_Procesa_Comandancia_Mover function , focus in this "IF":

Código: [Seleccionar]
                if (partes_comando[1].Equals(__T("COMMAND_CHAT_WORD_AAA_SINGLE"), StringComparison.OrdinalIgnoreCase))
                {
                    tipo = (int)UNIDAD_TIPO.aaa;
                    tipo_detectado = true;
                }

COMMAND_CHAT_WORD_AAA_SINGLE must be COMMAND_CHAT_WORD_AAA_ALL , like this:

Código: [Seleccionar]
                if (partes_comando[1].Equals(__T("COMMAND_CHAT_WORD_AAA_ALL"), StringComparison.OrdinalIgnoreCase))
                {
                    tipo = (int)UNIDAD_TIPO.aaa;
                    tipo_detectado = true;
                }

I hope release a new version, but.... for this time this will fix this ;)

I'm with the escape/capture error... this will be hard and takes me a while... stay tuned ;)

Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en octubre 08, 2014, 10:30:10 am
Unless I did something wrong, the Beaverette is still scoring double points when killed as a regular unit.  It might be best to just not reuse a vehicle also contained in a supply column.  Then we don't have to worry about it. ;)

The AAA movement order is working now, and doesn't grab the artillery with it anymore.  Thank you.
Título: Re:Many Questions
Publicado por: Grainovich en octubre 08, 2014, 11:03:43 am
mmm.. double points?... mmm... let me see...
Título: Re:Many Questions
Publicado por: Grainovich en octubre 12, 2014, 08:02:05 pm
Well... Stecher , I found it finally!!  :tillo:

Please, download again the hrcodwar.cs (hrcodwar_server.rar) and make your own changes.

There are several changes and it's quite complicated explain step to step the code lines changes.

https://www.dropbox.com/sh/anpckmbcd5pcc9c/AABhERL7VMEhnJQy5IEGQSW9a?dl=0 (https://www.dropbox.com/sh/anpckmbcd5pcc9c/AABhERL7VMEhnJQy5IEGQSW9a?dl=0)

The Bravete, score points, all is fixed.... I hope ;D , I have thoroughly tested the system score and yes! you was right, the columns units were a problem, now the system count and score is ok.

As is tradition, the capture / escape bug is still pending  :P
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en octubre 14, 2014, 08:33:17 am
Got it, thanks.
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en octubre 16, 2014, 06:15:56 am
Just confirming that the reused units are no longer double scoring in the new version.

But I have a potentially big question about how penalties are enforced.  We've been trying for a couple weeks to add in more penalty settings for various events, like ditching and bailing.  And I was hoping to separate injury penalties from captures and deaths.  Although we may be close to figuring out how to add more than the current 3 penalties, we haven't gotten it to work yet.

But perhaps a bigger issue for some ideas we have for our campaign, is the possibility of changing the penalty enforcement trigger.  Right now, it appears that it kicks you out of the server if you are under any penalty time, and you are connected (or trying to reconnect).  We would love to change it so that the penalty enforcement triggers when you try to take off in the plane (wheels up, not just spawning), as opposed to simply being on the server.  This will allow players who have been killed/captured, to still play as a flak gunner or tank commander, if they want to, instead of just having to leave.  We think it will help us hold better attendance throughout missions, allowing people to stay online and play, while still maintaining our "one life" (as a pilot) policy.  We're poking around with the cs, and are trying to figure these things out ourselves, but we'd appreciate a hint. ;)  Is this a simple change in code, where we call on a different event (for takeoff), or would this be really complicated to achieve?
Título: Re:Many Questions
Publicado por: Grainovich en octubre 17, 2014, 07:37:27 pm
Oh Stecher, I understand you so well and I would like to help you to developing new features... believe me, I cant, so sorry.

When we finished the main version we canceled a lot of planned features because we have not more time to developing it.

One of these cancel feature is the possibility to drive tanks and AAA , yes! we thought on this seriously ;D , in fact, developing this feature is easy, I think this is possible with a little changes on the code, actually this feature is disabled because his consequences is not controlled by the system.

Consequences? , yes!, when you are in pilot rol If you leave your plane flying (with esc for example) you will get a penalty ok?, but... what happens If you drive a tank along several sector (we suppose you can do it without bridges) and leave it?, this is logic? the drive or his gunner (in one tank can be two human) should get a penalty?, yes? no? and what is the correct logic? , and another problem, If a commander can move a unit a numbers of sectors... what happens with a tank moved with human interaction?, if he has moved much that these sectors? can do it?, and his coordinates? must be update in the memory to save correctly in the json files... and events!! you must to write new events for "person enter in a tank like pilot", "another person enter in a tank like gunner", etc, etc...

You see, it's is not complicated (for me that i wrote the code but for another can be a serious hell) but even for me this will need a lot of hours of coding and testing this new feature, hours of at least two person trying all possible consequences, "I drive and I dead by you", "I drive, get gunner and open fire to your airplane", "I drive and another person on gunner site open fire over your plane", etc... etc...

About the more penalties... in fact, ditching and baling will be the same, because the system have to calculate if you will be capture, escape or simply return to your home, all is resume in capture penalty or not, and it's more complicated, because is possible the pilot is injured and must to get rest in the hospital, in this case, you have a lot of possible events.

In this days, the SG1 squad (http://sg1.es/foro/hrcodwar-iii (http://sg1.es/foro/hrcodwar-iii)) pick up the code and they are implementing new interesting features like fuel returned, bombing and destroying by range and kilos of explosives, control of pilots out of battle area and another features that they are planning, who knows!? , is possible they will code your wishes features! ;D

Anyway, the penalties control is in:

public void piloto_Penaliza(int indice_piloto, string causa, Point2d coordenadas)

Every time you got to sit in a plane (or a tank ;D) or move inside of it,  the next events will be fired.

HRCODWAR_OnPlaceEnter(Player jugador, AiActor actor, int placeIndex)
HRCODWAR_OnPlaceLeave(Player piloto, AiActor actor, int placeIndex)

These events is pretty important and basically controlling all events in the campaign.

Now, the event function is disabling the vehicle units is on HRCODWAR_OnPlaceEnter, you can see:

Código: [Seleccionar]

// Es un aparato o una unidad terrestre??
string clase_aparato = "(unknown)";
if (vehiculo.InternalTypeName().IndexOf("bob:Aircraft") != -1)
{
    clase_aparato = vehiculo.InternalTypeName().Replace("bob:Aircraft.", "");
}
else
{
    eventos_Terrestre_Sacar_Jugadores(vehiculo);
    return;
}

The function eventos_Terrestre_Sacar_Jugadores(vehiculo) is making the job.

Stecher, the ideas are simples but the reality is a little more complicate  :P
Título: Re:Many Questions
Publicado por: 3./JG51_Stecher en octubre 22, 2014, 07:04:14 am
Okay, that clears up one major issue.  I was really confused why we kept getting kicked out of the guns.  I though it was something I was doing wrong with the server settings or something.  So you actually made it do that on purpose, because it doesn't track or enforce the player status while in a ground object.  I understand that, but I am actually happy that it does not track the player.  Our idea was to use it as a means to let people play who had been killed as a pilot, since they can't fly again.  Just a simple way to playing something, outside of the penalty system.  So commenting that one section out of the code makes it work almost exactly how I was hoping it would. ;D

Even if it will revert the vehicle position to where it started instead of where it had been driven to, I doubt that's ever going to be more than a single 10km sector anyway.
Título: Re:Many Questions
Publicado por: SG1_Lud en octubre 26, 2014, 12:22:43 pm
Just confirming that the reused units are no longer double scoring in the new version.

But I have a potentially big question about how penalties are enforced.  We've been trying for a couple weeks to add in more penalty settings for various events, like ditching and bailing.  And I was hoping to separate injury penalties from captures and deaths.  Although we may be close to figuring out how to add more than the current 3 penalties, we haven't gotten it to work yet.

But perhaps a bigger issue for some ideas we have for our campaign, is the possibility of changing the penalty enforcement trigger.  Right now, it appears that it kicks you out of the server if you are under any penalty time, and you are connected (or trying to reconnect).  We would love to change it so that the penalty enforcement triggers when you try to take off in the plane (wheels up, not just spawning), as opposed to simply being on the server.  This will allow players who have been killed/captured, to still play as a flak gunner or tank commander, if they want to, instead of just having to leave.  We think it will help us hold better attendance throughout missions, allowing people to stay online and play, while still maintaining our "one life" (as a pilot) policy.  We're poking around with the cs, and are trying to figure these things out ourselves, but we'd appreciate a hint. ;)  Is this a simple change in code, where we call on a different event (for takeoff), or would this be really complicated to achieve?

As Grainovich says, it is doable but if you want yo make it right, and keep the code being "healthy" and efficient, there are a few things to do.

There are several ways to let the player enter the game and let him do some things (except taking a new plane), but IMO the correct way would be (sketch):

* create a new property in the class HRCODWAR_PILOTO, like banned_from_planes (bool)
* if you are in the middle of a ongoing campaign, you will need to add a new constructor [json constructor] to the class, which does NOT have that property. Thus you can load the last mission json wihtout gettin a runtime error when the system loads the jsons at the beginning of the next match.
* then when the player connects (handled by piloto_Conecta(player) ) you have to avoid the kick currently coded.
* then when he tries to enter a place (handled by HRCODWAR_OnPlaceEnter) you have to avoid when the current code detects that the player has entered a ground vehicle ->( look for eventos_Terrestre_Sacar_Jugadores) and code your own logic.

Your own logic will have to take care of a lot of possibilities, (if you follow Grainovich logic for the planes you can get a slight idea of the work to be done).

Then you have to track down though the code, every time that the class HRCODWAR_PILOTO (or its matching collection HRCODWAR_PILOTOS) is looking at the place of the pilot, the logic is not broken by having the pilot in a vehicle.

Then you have to check that when the player is killed, the vehicle is correctly disabled and/or destroyed, and the points added to the initiator..

Are you still reading? :D

Then you will discover that anyone with a gun can destroy your buildings and win the war alone... :D

(In the latest mod we have introduced a new feature to avoid this , we will publish it very soon)

So basically I concur with Grainovich. Doable yes, but you will have to weight the pros and the cons. But as your original idea is to give something to do to the banned players, I can suggest you something: we are implementing a new feature for Radar Fighter Command for RAF and Freya for Lutwaffe, largely based on Kodiak's work. The way we have coded it it would be very simple to let the player act as controller for their team, by asking the radar stations and reporting to the flight leaders...

A final word: We know that as the code is commented and developed in spanish, it is difficult to follow if you don't speak our language. While we develop our mods, we are investing a significative amount of time in documenting every function, and how to add new features to HRDCODWAR step by step, while keeping the original structure. ( We don¡t want to add new features at the price of messing up the code until it becomes unreadable, hard to maintain or uneficcient.) This project was called "HRCODWAR Programmer Reference".

We will share with the Community, currently is written in Spanish and its growing as we learn new things,  if you have the patience until we finish it... in the meantime feel free to ask us. :)

Título: Re:Many Questions
Publicado por: SG1_Lud en octubre 26, 2014, 12:31:19 pm
I forgot one thing: if you are coding your own stuff , it would be great if you follow some conventions:

- comment out every block you create with something like // GHOST SKIES MOD
- name your versions after the main HRCODWAR version, adding your own subversion. For instance, we use 3.65s wich means: based on main version HR 3.6 , subversion 5s by SG1
- make your features to be enabled/disabled by a simple change in a variable stored in conf.ini


Of course you're not obliged to do that, but if you plan to share your work this is a good way ( me thinks)

Saludos