Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

DelayRename Question

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> War in the Pacific: Admiral's Edition >> Scenario Design and Modding >> DelayRename Question Page: [1]
Login
Message << Older Topic   Newer Topic >>
DelayRename Question - 9/3/2017 6:24:03 PM   
witpqs


Posts: 23616
Joined: 10/4/2004
From: Argleton
Status: offline

In scenario 28-C some LCU have 'DelayRename' fields with these values:
unit number 6280: '43101'
unit number 6784: '4208'
unit number 7731: '4309'
unit number 7732: '4503'
unit number 7734: '4309'
unit number 7736: '4411'
unit number 7739: '4406'
unit number 7740: '4406'
unit number 7745: '4406'
unit number 7746: '4502'
unit number 7756: '4502'

Units with no rename have that field set to '0', and it seems the majority of units with a rename have the field set to a six-digit date. I assume the five-digit date above (unit # 6280) is simply a typo.

My question is this: is a four-digit date legal for the rename field? Will the game accept it and implement it as year-month (eg 1942-08 for unit # 6784: '4208' shown above)? Or will the game ignore dates formed this way?

I'm hoping that someone knows for certain, because I have to code the appropriate behavior into Intel Monkey.

_____________________________

Post #: 1
RE: DelayRename Question - 9/3/2017 10:03:12 PM   
Admiral DadMan


Posts: 3431
Joined: 2/22/2002
From: A Lion uses all its might to catch a Rabbit
Status: offline
Very good question, as even in stock Scen 1, your findings are also present. I don't have an answer for you beyond that I'd agree that they are typos.

_____________________________

Scenario 127: "Scraps of Paper"
(\../)
(O.o)
(> <)

CVB Langley:

(in reply to witpqs)
Post #: 2
RE: DelayRename Question - 9/4/2017 2:04:04 AM   
witpqs


Posts: 23616
Joined: 10/4/2004
From: Argleton
Status: offline

quote:

ORIGINAL: Admiral DadMan

Very good question, as even in stock Scen 1, your findings are also present. I don't have an answer for you beyond that I'd agree that they are typos.

Well, I am only fairly certain that the 5-digit one is a typo.

The 4-digit ones I just don't know. The code could easily be made to assume the first day of the month when presented with only 4 digits.

_____________________________


(in reply to Admiral DadMan)
Post #: 3
RE: DelayRename Question - 9/4/2017 5:12:29 PM   
Admiral DadMan


Posts: 3431
Joined: 2/22/2002
From: A Lion uses all its might to catch a Rabbit
Status: offline
In my testing so far, neither of those formats have changed the name.

_____________________________

Scenario 127: "Scraps of Paper"
(\../)
(O.o)
(> <)

CVB Langley:

(in reply to witpqs)
Post #: 4
RE: DelayRename Question - 9/4/2017 8:39:29 PM   
witpqs


Posts: 23616
Joined: 10/4/2004
From: Argleton
Status: offline

quote:

ORIGINAL: Admiral DadMan

In my testing so far, neither of those formats have changed the name.

That's what I hoping someone knew one way or the other - thank you!

_____________________________


(in reply to Admiral DadMan)
Post #: 5
RE: DelayRename Question - 9/4/2017 9:40:18 PM   
Admiral DadMan


Posts: 3431
Joined: 2/22/2002
From: A Lion uses all its might to catch a Rabbit
Status: offline
Yeah, I think they are errata, and would need to be corrected in a db update.

_____________________________

Scenario 127: "Scraps of Paper"
(\../)
(O.o)
(> <)

CVB Langley:

(in reply to witpqs)
Post #: 6
RE: DelayRename Question - 9/5/2017 3:41:37 AM   
PaxMondo


Posts: 8468
Joined: 6/6/2008
Status: offline

quote:

ORIGINAL: witpqs


In scenario 28-C some LCU have 'DelayRename' fields with these values:
unit number 6280: '43101'
unit number 6784: '4208'
unit number 7731: '4309'
unit number 7732: '4503'
unit number 7734: '4309'
unit number 7736: '4411'
unit number 7739: '4406'
unit number 7740: '4406'
unit number 7745: '4406'
unit number 7746: '4502'
unit number 7756: '4502'

Units with no rename have that field set to '0', and it seems the majority of units with a rename have the field set to a six-digit date. I assume the five-digit date above (unit # 6280) is simply a typo.

My question is this: is a four-digit date legal for the rename field? Will the game accept it and implement it as year-month (eg 1942-08 for unit # 6784: '4208' shown above)? Or will the game ignore dates formed this way?

I'm hoping that someone knows for certain, because I have to code the appropriate behavior into Intel Monkey.

In my mod, they are all 6 digits yymmdd and they all work. Same for air groups; 6 digits.

_____________________________

Pax

(in reply to witpqs)
Post #: 7
RE: DelayRename Question - 9/5/2017 4:09:08 AM   
witpqs


Posts: 23616
Joined: 10/4/2004
From: Argleton
Status: offline

quote:

ORIGINAL: PaxMondo


quote:

ORIGINAL: witpqs


In scenario 28-C some LCU have 'DelayRename' fields with these values:
unit number 6280: '43101'
unit number 6784: '4208'
unit number 7731: '4309'
unit number 7732: '4503'
unit number 7734: '4309'
unit number 7736: '4411'
unit number 7739: '4406'
unit number 7740: '4406'
unit number 7745: '4406'
unit number 7746: '4502'
unit number 7756: '4502'

Units with no rename have that field set to '0', and it seems the majority of units with a rename have the field set to a six-digit date. I assume the five-digit date above (unit # 6280) is simply a typo.

My question is this: is a four-digit date legal for the rename field? Will the game accept it and implement it as year-month (eg 1942-08 for unit # 6784: '4208' shown above)? Or will the game ignore dates formed this way?

I'm hoping that someone knows for certain, because I have to code the appropriate behavior into Intel Monkey.

In my mod, they are all 6 digits yymmdd and they all work. Same for air groups; 6 digits.

Thanks. I know that 6 digits does work, but I wasn't sure about 4. I'm having the code blank out (set = '0') any date imported with only 4 digits.

_____________________________


(in reply to PaxMondo)
Post #: 8
RE: DelayRename Question - 9/5/2017 2:48:11 PM   
Admiral DadMan


Posts: 3431
Joined: 2/22/2002
From: A Lion uses all its might to catch a Rabbit
Status: offline

quote:

ORIGINAL: witpqs

Thanks. I know that 6 digits does work, but I wasn't sure about 4. I'm having the code blank out (set = '0') any date imported with only 4 digits.

Don't forget that 5 digit on also

_____________________________

Scenario 127: "Scraps of Paper"
(\../)
(O.o)
(> <)

CVB Langley:

(in reply to witpqs)
Post #: 9
RE: DelayRename Question - 9/5/2017 4:02:21 PM   
witpqs


Posts: 23616
Joined: 10/4/2004
From: Argleton
Status: offline
quote:

ORIGINAL: Admiral DadMan


quote:

ORIGINAL: witpqs

Thanks. I know that 6 digits does work, but I wasn't sure about 4. I'm having the code blank out (set = '0') any date imported with only 4 digits.

Don't forget that 5 digit on also

The 5 digit one does not work, correct?

Here is the current code. It handles all the dates I find in the scenario CSV files.
    if (indate != '0') and (len(indate) != 6) and (indate != '9999') or \
        not indate.isdigit():
        print(f"Bad value for '{item}' in unit number " + 
            f"{unit}: '{indate}' :: Returning '0'")
        return '0'

    if (indate != '0') and (indate != '9999'):
        return ''.join([
            '19', indate[:2], '-', 
            indate[2:4], '-', 
            indate[4:],
            ])
    else:
        return indate


The date must be all digits and ("0" or "9999" or length of 6) to be valid. If it is not valid I convert it to "0".

If it is a valid (6-digit) AE date (YYMMDD) I convert it to the form I use in Intel Monkey (YYYY-MM-DD).

For those reading who haven't seen these dates before, "0" means "no delay" and "9999" in an arrival field means "never arrive" (effectively "not in the game").


< Message edited by witpqs -- 9/5/2017 4:06:07 PM >


_____________________________


(in reply to Admiral DadMan)
Post #: 10
RE: DelayRename Question - 9/5/2017 4:08:43 PM   
Admiral DadMan


Posts: 3431
Joined: 2/22/2002
From: A Lion uses all its might to catch a Rabbit
Status: offline

quote:

ORIGINAL: witpqs

quote:

ORIGINAL: Admiral DadMan


quote:

ORIGINAL: witpqs

Thanks. I know that 6 digits does work, but I wasn't sure about 4. I'm having the code blank out (set = '0') any date imported with only 4 digits.

Don't forget that 5 digit on also

The 5 digit one does not work, correct?

Here is the current code. It handles all the dates I find in the scenario CSV files.
    if (indate != '0') and (len(indate) != 6) and (indate != '9999') or \
        not indate.isdigit():
        print(f"Bad value for '{item}' in unit number " + 
            f"{unit}: '{indate}' :: Returning '0'")
        return '0'

    if (indate != '0') and (indate != '9999'):
        return ''.join([
            '19', indate[:2], '-', 
            indate[2:4], '-', 
            indate[4:],
            ])
    else:
        return indate


The date must be all digits and ("0" or "9999" or length of 6) to be valid. If it is not valid I convert it to "0".

If it is a valid (6-digit) AE date (YYMMDD) I convert it to the form I use in Intel Monkey (YYYY-MM-DD).

For those reading who haven't seen these dates before, "0" means "no delay" and "9999" in an arrival field means "never arrive" (effectively "not in the game").


Yes, 4 and 5 digit entries in that cell do NOT change the unit name.

_____________________________

Scenario 127: "Scraps of Paper"
(\../)
(O.o)
(> <)

CVB Langley:

(in reply to witpqs)
Post #: 11
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> War in the Pacific: Admiral's Edition >> Scenario Design and Modding >> DelayRename Question Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.109