Author Topic: Race configuration format  (Read 4212 times)

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Race configuration format
« Reply #25 on: August 28, 2013, 06:23:42 PM »
necavi,

1 i cant KvSetString to a blank ""
2 i can't give descriptions to theses configs like i can with war3 cvars
« Last Edit: August 28, 2013, 07:37:16 PM by Ownz »

Necavi

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
Re: Race configuration format
« Reply #26 on: August 31, 2013, 01:08:23 PM »
Setting KvSetString to a blank string is the same as not setting it at all, defaults will be read in.
Talk to diablo, he's the one who wants to develop this further.

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Race configuration format
« Reply #27 on: August 31, 2013, 02:14:47 PM »
what if you have blank defaults for some configs? it wont even show up in the default KV file

its possible to specify null as "" and do internal checking
but we still would be lacking descriptions for each cvar, that could be hacked into cvar_desc config just to force write it to the file, but kinda messy
« Last Edit: August 31, 2013, 02:16:18 PM by Ownz »

Necavi

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
Re: Race configuration format
« Reply #28 on: August 31, 2013, 02:26:39 PM »
I was going to write my own keyvalues writer (not as much work as it sounds) but haven't gotten around to it.

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Race configuration format
« Reply #29 on: August 31, 2013, 06:17:46 PM »
wwwwwwut, might as well as write a internal cvar parser

Necavi

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
Re: Race configuration format
« Reply #30 on: August 31, 2013, 07:47:50 PM »
...um...it comes down to a SIMPLE recursive function and not much else...I mean, take a look at: https://github.com/necavi/py-keyvalues/blob/master/keyvalues.py#L10 roughly the same thing for pawn.