2019-03-20 12:49 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002315Spring engineGeneralpublic2015-11-18 01:42
Reporterabma 
Assigned To 
PriorityurgentSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
Product Version101.0 
Target Version83.0Fixed in Version 
Summary0002315: (unitsync) modinfo.lua lacks "Author" attribute
DescriptionGetModAuthor (int index) is missing in unitsync_api.h as well...
TagsNo tags attached.
Checked infolog.txt for lua Errors
Attached Files

-Relationships
related to 0002370new disallow depends on filenames in modinfo.lua 
related to 0002996resolvedabma UnitSync - GetInfoMapSize doc 
related to 0003010closedhokomoko modtype = 0 (hidden) archives can't be "parsed" with unitsync 
has duplicate 0002412resolvedabma allow "soft"-depends/recommondations for games in modinfo.lua 
has duplicate 0003000resolvedabma unitsync doesn't list missing files as depend 
+Relationships

-Notes

~0006510

hoijui (reporter)

Last edited: 2011-03-25 22:48

relevant functions are:
GetPrimaryModCount()
GetPrimaryModName()
GetPrimaryModShortName()
...

a sample ModInfo.lua:
######################################
return {
  name='Advanced BA',
  description='Adv. BA v1.64 + BA V7.19 + CA Chickens',
  shortname='AdvBA',
  version='1.64 beta (BA7.19)',
  mutator='',
  game='',
  shortGame='',
  modtype=1,
  depend = {
    'Balanced Annihilation V7.19',
    'Advanced BA beta base',
  },
}
######################################

I feel a better format would have been the one used by AIInfo.lua, which looks like this:
######################################
local infos = {
    {
        key = 'shortName',
        value = 'KAIK',
        desc = 'machine conform name.',
    },
...
######################################
This would have made this feature request obsolete.

A change to that format is not worth the troubles i guess, though we could change the unitsync interface to the one used for AI Info, which works in the same way the options already do for Mods, Maps and Skirmish AIs.
So we would have:
int GetPrimaryModInfoCount()
int GetMapInfoCount(int mapIndex)
int GetSkirmishAIInfoCount(int skirmishAiIndex)
const char* GetInfoKey(int index);
const char* GetInfoValue(int index);
const char* GetInfoDescription(int index);

The later 4 already exist, and with the former 2, we could deprecate a lot of unitsync functions, and still easily keep them.

Besides the mentioned author attribute, mods and maps would be able to give away arbitrary info this way. The only minor downside is, that they would get all values as strings, when using the new method.

This would also help in keeping the untisync API more stable.

~0006609

jK (developer)

was it done?

~0006624

hoijui (reporter)

so far, only for mod, map is missing still, but doing it the way we discussed it in the meeting, it will be much simpler to implement:
when parsing mapinfo.lua, in addition to filing in the info structs members, we also fill in a map<string, InfoItem>.

~0008416

abma (administrator)

is there currently a way to the values in the table 'depend' of modinfo.lua?

~0015336

abma (administrator)

https://github.com/spring/spring/commit/606a88b3d8731bc94a88ecdeb1cc594180ae0ace
+Notes

-Issue History
Date Modified Username Field Change
2011-01-22 11:51 abma New Issue
2011-01-22 11:51 abma Severity minor => feature
2011-02-04 02:08 abma Summary modinfo.lua lacks "Author" attribute => (unitsync) modinfo.lua lacks "Author" attribute
2011-03-25 22:48 hoijui Note Added: 0006510
2011-03-25 22:48 hoijui Note Edited: 0006510
2011-05-07 14:41 jK Note Added: 0006609
2011-05-09 11:59 hoijui Note Added: 0006624
2011-06-10 16:34 hoijui Assigned To => hoijui
2011-06-10 16:34 hoijui Status new => assigned
2011-06-10 16:34 hoijui Target Version => 0.83.0
2011-07-07 02:57 abma Relationship added has duplicate 0002412
2012-03-08 23:11 abma Relationship added related to 0002370
2012-03-08 23:12 abma Note Added: 0008416
2012-03-08 23:15 abma Relationship added related to 0003000
2012-03-08 23:16 abma Relationship added related to 0002996
2012-03-08 23:23 abma Relationship replaced has duplicate 0003000
2012-03-08 23:25 abma Priority normal => urgent
2012-03-13 03:55 abma Relationship added related to 0003010
2015-11-18 01:40 abma Note Added: 0015336
2015-11-18 01:41 abma Status assigned => resolved
2015-11-18 01:41 abma Resolution open => fixed
2015-11-18 01:42 abma Assigned To hoijui =>
2015-11-18 01:42 abma Product Version => 101.0
+Issue History