Date confusion

A forum to discuss custom scenarios, campaigns and modding in general.

Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design

airbornemongo101
Lieutenant Colonel - Fw 190A
Lieutenant Colonel - Fw 190A
Posts: 1177
Joined: Wed Sep 07, 2011 1:16 am
Location: Quakertown,PA. THE US OF A

Date confusion

Post by airbornemongo101 »

Ok,,,I've been working on the "Mod that shall not be named" and the Expanded SE Unit Mod and I've hit a very perplexing issue that has me ready to scream (at the very least :shock: )

Here's the problem:

I'm making a new unit and tweaking existing entries of the Heer/SE Panzer IIIG (using the editor provided my Mr. Garnett of course)

I make the new/copy entry,,add new attributes,name,etc.. and save. All is good,,,so far

I go and check to make sure everything is ok ,and the availiblity dates have changed :? (they don't match) . I'm thinking,"ok i screwed up" (not the 1st time this has happened of course :lol: )"I'll do it again",,so I do it again (ensuring that the dates match) .THE DATES STILL DON'T MATCH :shock: . Repeat above process far to many times and I keep on getting the same results (I know about the saying,,but I was already insane before this :P )

IE:the date of avail. for the vanilla PZ IIIG is 7 March ,1940,however the avail date for the new unit (I don't want to mention the unit's indentifier in case someone takes offence,suffice to say it's a Pz. IIIG :wink: ) is 3 July,1940. So I make sure they both read 7,March,but one will still read 3 July,,they keep on flip/flopping. The SE date will jump also. Every once in a while I'll get a real odd-ball date (I don;t exactly remember one of them att)

I've tried deleting units and adding units/entries in every variation anybody could possible think of in the last two days,but I still not get the units availibility dates to match. This has happened w/ other units as well (1st one that comes to mind is the PIIIJ/1). I've even tried new dates,but then I ran into the issue of getting the IIIG at the same time as the IIIF or the IIIH.

Anybody know what's happening?

Why can I not get at least two of the units dates to match???

Is there a fix,,or is something hardcoded? to prevent adding/copying work

Any help is appreciated

Thanks in advance
Last edited by airbornemongo101 on Mon Dec 05, 2011 12:39 am, edited 1 time in total.
....that we here highly resolve that these dead shall not have died in vain.......and that government of the people, by the people, for the people shall not perish from the earth.


Always remember, Never Forget:

Box 8087

5 - 5 - 5 - 5
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Post by El_Condoro »

(You did say 'any help')

Are you clicking the 'Commit' button after you make changes? I ran a test:

1. Open the files as normal.
2. Click on Pz IIIE (there is no SS, er SE PzIIIE yet) and Copy
3. Scroll down to the bottom of the list and click on the new copy (something like 3033 is the number in my efile)
4. Change the available date and unit name to SE Panzer IIIIE
5. Click 'Commit Unit'
6. Click 'Save' and overwrite the equipment.eqeqp file

Voila! New SS Panzer IIIE with a new available from date.
airbornemongo101
Lieutenant Colonel - Fw 190A
Lieutenant Colonel - Fw 190A
Posts: 1177
Joined: Wed Sep 07, 2011 1:16 am
Location: Quakertown,PA. THE US OF A

Post by airbornemongo101 »

El_Condoro wrote:(You did say 'any help')

Are you clicking the 'Commit' button after you make changes? I ran a test:

1. Open the files as normal.
2. Click on Pz IIIE (there is no SS, er SE PzIIIE yet) and Copy
3. Scroll down to the bottom of the list and click on the new copy (something like 3033 is the number in my efile)
4. Change the available date and unit name to SE Panzer IIIIE
5. Click 'Commit Unit'
6. Click 'Save' and overwrite the equipment.eqeqp file

Voila! New SS Panzer IIIE with a new available from date.

El Condoro,,good to see you have the same sense of humor I do :P :P :wink: .

I made the PzIIIE (and ALOT of others) w/ no problems at all. I've got the use of editor down pat. Thanks to all of the help I got earlier.

The dates are changing on the PzIIIG and PIIIJ/1 additions and a couple of others (didn't write the others down :oops: ),,all other entries/units are good to go and working. I'm thinking it's got to be something in the game itself.

P.S. Sorry my above example had the PzIIIE,,I'll change it,,sorry for the confusion
:oops:

BTW,,thanks for the reply :P :wink:
....that we here highly resolve that these dead shall not have died in vain.......and that government of the people, by the people, for the people shall not perish from the earth.


Always remember, Never Forget:

Box 8087

5 - 5 - 5 - 5
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Post by El_Condoro »

Sorry, I can't get the problem you're describing to occur. I played around with a PzIIIG and changed its available date to 7 March, 1940; copied it to a new SE Pz IIIG with the same date. Commit unit for each and save. Close and re-open and the dates are all OK. Unless I'm missing something in what you are saying?
airbornemongo101
Lieutenant Colonel - Fw 190A
Lieutenant Colonel - Fw 190A
Posts: 1177
Joined: Wed Sep 07, 2011 1:16 am
Location: Quakertown,PA. THE US OF A

Post by airbornemongo101 »

El_Condoro wrote:Sorry, I can't get the problem you're describing to occur. I played around with a PzIIIG and changed its available date to 7 March, 1940; copied it to a new SE Pz IIIG with the same date. Commit unit for each and save. Close and re-open and the dates are all OK. Unless I'm missing something in what you are saying?
Ok,,let me try again,,I've got to be scrweing something up

If it happens again,,I'll post something.

Maybe I need to re-intsall or something :?

Thanks for the again help :wink: .
....that we here highly resolve that these dead shall not have died in vain.......and that government of the people, by the people, for the people shall not perish from the earth.


Always remember, Never Forget:

Box 8087

5 - 5 - 5 - 5
airbornemongo101
Lieutenant Colonel - Fw 190A
Lieutenant Colonel - Fw 190A
Posts: 1177
Joined: Wed Sep 07, 2011 1:16 am
Location: Quakertown,PA. THE US OF A

Post by airbornemongo101 »

Well after a very,very,very frustrating weekend I figured it out :D

El Condoro you helped :wink:

I decided to copy my steps presicely in your post and I was documenting the whole procedure in my notes,,and you're right it worked :P .

I then screwed around a little and realized what was wrong,,for some reason there are a evidently some units that you must save the work after each individual unit (at least that's the only reason I could come up with :? ),,the PzIIIG and the PzIIIJ/1 being among them. :shock:

I had been doing an entire class,commiting after each unit of course, and then saving.

Thanks for the hope El Condoro. 8)

Did I mention that this weekend was very frustrating? 8)
....that we here highly resolve that these dead shall not have died in vain.......and that government of the people, by the people, for the people shall not perish from the earth.


Always remember, Never Forget:

Box 8087

5 - 5 - 5 - 5
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Post by El_Condoro »

Glad you got it sorted. That 'Commit Unit' button is critical and, yes, I think it has to be used after every unit has its details changed.
rezaf
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1487
Joined: Mon Aug 15, 2011 3:27 pm

Post by rezaf »

Sounds like a bug anyways.
I mean - March 7th and July 3rd ... that's 7/3/40 and 3/7/40.
The DateTime locale is possibly casted the wrong way at some point.
Happened to my entire file once when I edited with OpenOffice.
_____
rezaf
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Post by El_Condoro »

Quite possible - Australian date format is dd/mm whereas PzC might be mm/dd?
mgarnett
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 110
Joined: Mon Nov 30, 2009 9:10 am

Post by mgarnett »

Hi Guys,

I've had a go at trying to replicate this issue and I have tried regional settings set to UK, AU and US (via the control panel applet) and swapped between the date formats dd/MM/YY and MM/dd/YY and I have not been able to replicate any date "day/month" swapping. Internally, the game stores dates as strings in the format dd/mm/yyyy. I interpret these dates and display the results in the "Available From" and "Available To" fields. These fields display the correct date values so there does not appear to be an issues reading the dates from the equipment file and displaying them.

When you press the "Commit" button, the application reads the dates from these fields, parses them into the correct format and then writes them back to your equipment file. I have pasted a section of the function that does this below just in case anybody else can see a mistake in my logic (I have added in some comments to explain what each line does for those who aren't familiar with coding):

// Reads the date from the DateTime control for the "Available From" date control into the string variable "fromDate"
// After completeing, an example value for the fromDate string is "Saturday, 27 May 1939" for the Gebirgsjäger unit
string fromDate = coAvailFromDateTime.Text;

// Converts the string value obtained above into a DateTime value whose format is based on your computers regional settings as set via the
// "Regional Settings" applet in your control panel. For AU/UK machines that is dd/mm/yyyy for US it is mm/dd/yyyy
// This intermediate step is required so that I can use the Windows date manipluation functions to change your regional date into the
// format required by the game which is dd/mm/yyyy regardless of the settings on your machine and so I can also use the nicely presented
// Windows DateTime picker controls that handle all of the formatting and validating
DateTime fromDateTime = DateTime.Parse(fromDate);

// Writes the DateTime value obtained in the previous line back to the equipment list at the correct index and formats it to dd/mm/yyyy
// so that the game will understand the date correctly
lEquipmentList[iCurIndex].sAvailFromDate = (fromDateTime.ToString("dd.MM.yyyy"));

// Same as above but for the "Available To" date
string toDate = coAvailToDateTime.Text;
DateTime mtoDateTime = DateTime.Parse(toDate);
lEquipmentList[iCurIndex].sAvailToDate = (toDateTime.ToString("dd.MM.yyyy"));

I also tried replicating the bug by editing and commiting multiple units (including the IIIG and IIIJ/1) and just single units but the dates still worked fine for me and I wasn't able to replicate the issue. If you can provide some detailed steps on how to replicate the issue I'll give it another go.

Cheers

Mark
bebro
Slitherine
Slitherine
Posts: 4575
Joined: Sun Nov 19, 2006 12:50 pm

Post by bebro »

mgarnett wrote:When you press the "Commit" button, the application reads the dates from these fields, parses them into the correct format and then writes them back to your equipment file.
Just curious - does that mean I don't have to save the equipment file extra everytime after I edited units? So far I always did "commit", then finally "save" for saving the file. I didn't kow "commit" already writes into the file.
VPaulus
Slitherine
Slitherine
Posts: 8325
Joined: Mon Dec 27, 2010 8:33 pm
Location: Portugal

Post by VPaulus »

bebro wrote:
mgarnett wrote:When you press the "Commit" button, the application reads the dates from these fields, parses them into the correct format and then writes them back to your equipment file.
Just curious - does that mean I don't have to save the equipment file extra everytime after I edited units? So far I always did "commit", then finally "save" for saving the file. I didn't kow "commit" already writes into the file.
As far as I understand it writes to equipment file in memory, but you still have to use save for saving in disk.
bebro
Slitherine
Slitherine
Posts: 4575
Joined: Sun Nov 19, 2006 12:50 pm

Post by bebro »

VPaulus wrote:
bebro wrote:
mgarnett wrote:When you press the "Commit" button, the application reads the dates from these fields, parses them into the correct format and then writes them back to your equipment file.
Just curious - does that mean I don't have to save the equipment file extra everytime after I edited units? So far I always did "commit", then finally "save" for saving the file. I didn't kow "commit" already writes into the file.
As far as I understand it writes to equipment file in memory, but you still have to use save for saving in disk.
Ahh, I see, thanks :)
airbornemongo101
Lieutenant Colonel - Fw 190A
Lieutenant Colonel - Fw 190A
Posts: 1177
Joined: Wed Sep 07, 2011 1:16 am
Location: Quakertown,PA. THE US OF A

Post by airbornemongo101 »

OK,,,after reading Mr. Garnett's point I did some more tests and here is what I foumd out.This is done on a "fresh re-install" and after opening the nesscary files ,btw the way,is at C:\Program(x86)\Slitherine\Panzer Corps\Data. Operating system is Win7 w/ latest service pack.

I can make a copy of the SE Pz.IIIG commit/save and the date originally shows 3/july/1940 after hitting commit,but when saved the date reverts to correct date of 7/March/1940. I've tested the entry by running the game and all is well. Both show up in the Sealion 40 scn.

If I use the Heer PzIIIG on line 20 of the Pzeqp. file is when this screw up occurs the date of avail for the new unit is 3/July/1940,w/ the "SS PzIIG" becoming avial. in Norway and the Heer unit becoming avail. in Sealion in tesing the game.

The same also applies to the PzIIIJ/1. The dates jump from 2/july/1942 to 7/Feb/1942.

I tried numerous times w/ different twist,but the above holds. The SE file has to be used,at least on my machine ,or I get the date screw up.

Thanks to everyone for taking an interest and helping w/ this issue.
Last edited by airbornemongo101 on Tue Dec 06, 2011 5:29 am, edited 2 times in total.
....that we here highly resolve that these dead shall not have died in vain.......and that government of the people, by the people, for the people shall not perish from the earth.


Always remember, Never Forget:

Box 8087

5 - 5 - 5 - 5
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Post by El_Condoro »

The dates jump from 2/july/1942 to 7/Feb/1942.
Again reversing the date format - 2/7 becomes 7/2.
flakfernrohr
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1572
Joined: Wed Aug 03, 2011 11:56 pm
Location: Texas

Post by flakfernrohr »

I had a similar experience with some units, but I never figured out what to attribute it to. I always make double sure that the date is changed and "clicked" properly. THEN, I "commit" and save, making certain the "save" is to the right "equipment" file in the Data folder. I also go back and check the units after I have made a few to "audit" them and make certain they are as I want them to be. And now you know why recommended only doing this sort of thing when uninterrupted concentration can take place. It's too easy to lose track of the thought train doing everything that needs to be done to make or change a unit. Best not to rush either.

But in any case, I am very glad that ABmongo has become a "Master" of the Equipment Editor. He will find much happiness now.
Old Timer Panzer General fan. Maybe a Volksturm soldier now. Did they let Volksturm drive Panzers?
airbornemongo101
Lieutenant Colonel - Fw 190A
Lieutenant Colonel - Fw 190A
Posts: 1177
Joined: Wed Sep 07, 2011 1:16 am
Location: Quakertown,PA. THE US OF A

Post by airbornemongo101 »

flakfernrohr wrote: But in any case, I am very glad that ABmongo has become a "Master" of the Equipment Editor. He will find much happiness now.

Maybe just a journeyman ,so far,not a master yet 8)

I'm a journeyman only because of the excellent and speedy help of the true masters :D
....that we here highly resolve that these dead shall not have died in vain.......and that government of the people, by the people, for the people shall not perish from the earth.


Always remember, Never Forget:

Box 8087

5 - 5 - 5 - 5
mgarnett
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 110
Joined: Mon Nov 30, 2009 9:10 am

Post by mgarnett »

airbornemongo101 wrote:OK,,,after reading Mr. Garnett's point I did some more tests and here is what I foumd out.This is done on a "fresh re-install" and after opening the nesscary files ,btw the way,is at C:\Program(x86)\Slitherine\Panzer Corps\Data. Operating system is Win7 w/ latest service pack.

I can make a copy of the SE Pz.IIIG commit/save and the date originally shows 3/july/1940 after hitting commit,but when saved the date reverts to correct date of 7/March/1940. I've tested the entry by running the game and all is well. Both show up in the Sealion 40 scn.

If I use the Heer PzIIIG on line 20 of the Pzeqp. file is when this screw up occurs the date of avail for the new unit is 3/July/1940,w/ the "SS PzIIG" becoming avial. in Norway and the Heer unit becoming avail. in Sealion in tesing the game.

The same also applies to the PzIIIJ/1. The dates jump from 2/july/1942 to 7/Feb/1942.

I tried numerous times w/ different twist,but the above holds. The SE file has to be used,at least on my machine ,or I get the date screw up.

Thanks to everyone for taking an interest and helping w/ this issue.
Hi airbornemongo101,

I hope you don't mind me asking a couple of additional questions, I just want to make sure I understanding everything correctly when I try and replicate. When you say "I can make a copy of the SE Pz.IIIG commit/save" do you mean

1. You are clicking on unit no. 20, the PzIIIG unit click "Add", making some changes and then clicking "commit"; or

2. You are clicking on unit no. 20, the PzIIIG unit, making some changes and then click "commit".

I only ask this because you have used the word "copy" so I just wanted to make sure I understood correctly. Now, after this, you save the file and the date in the saved equipment file is reversed. So, just before you click "Save" the date displayed in the date control is 2 July 1942 but when saved, the date that is saved is 7 February 1942. Also, this error only occurs when editing the PzIIIG and PzIIIJ/1 but NOT the the SE Pz.IIIG. It's pretty strange that it is only happening on selected units so there must be something different in the data for those two units.

If you could let me know the answers to my queries above and I'll keep on looking in the meantime.

Cheers

Mark
mgarnett
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 110
Joined: Mon Nov 30, 2009 9:10 am

Post by mgarnett »

bebro wrote:
mgarnett wrote:When you press the "Commit" button, the application reads the dates from these fields, parses them into the correct format and then writes them back to your equipment file.
Just curious - does that mean I don't have to save the equipment file extra everytime after I edited units? So far I always did "commit", then finally "save" for saving the file. I didn't kow "commit" already writes into the file.
Hi bebro,

All of the editing takes place on a copy of the database retained in memory. This why there is a commit button as without it, it's too easy to make unwanted changes to your equipment database.

The editor reads the entire database file into memory, then when you change a unit and press commit, the change is made to entry in memory only. You only need to press "Save" when you want to write/save the entire equipment database back to disk. So you can start saving yourself a few clicks!

Cheers

Mark
mgarnett
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 110
Joined: Mon Nov 30, 2009 9:10 am

Post by mgarnett »

airbornemongo101 wrote:
flakfernrohr wrote: But in any case, I am very glad that ABmongo has become a "Master" of the Equipment Editor. He will find much happiness now.

Maybe just a journeyman ,so far,not a master yet 8)

I'm a journeyman only because of the excellent and speedy help of the true masters :D
Hi airbornemongo101,

I've compiled a new executable in which I explicitly tell Windows to format the long date in the display as dddd, d MMMM yyyy rather than relying on Windows formatting the long date. Can you let me know if you are happy for me to email it through to you and I will do so. You can reach me at "m.garnett(at)optusnet.com.au".

Cheers

Mark
Post Reply

Return to “Panzer Corps : Scenario Design”