Ambrosia Garden Archive
    • Cargo resourses


      Id's and how to make new ones

      For a plugin that I am making I may need to make a new cargo type (stolen plans) and i don't know how to do it (I'm using EVNEW). there seems to be sme unused cargo types that are not junks or regular cargo, but the Bible is very vague about them. some built in nova missions use them (like beureu agent) but there only seems to be randomly placed strings in the datafiles themselves that contain this information, and i am at a loss of what to do next. <_< any help would be appreciated.

    • I don't know what the mechanics of doing this in EVNEW are (I'm using a Mac), but all you should need to do is add another entry to the end of each of the cargo string rescources (STR IDs 400, 4001, 4002). Then enter the correct number in the misn resource.

      Also, the EVNEW documentation might mention something about how to edit strings. If so, follow those instructions.

    • It's better all around not to replace the STR# by a new one with one more entry, but instead use the "handy string patching functionality" described in the Appendix III of the Bible. Though the IDs to use for this do not appear in the list (though an allusion is made to it in "For example, to change the first cargo type from food to something else, youÂ’d simply create a 'STR ' resource with the ID 9000 and type in the name of your new commodity"), they are 9000 and up to patch the uppercase cargo name (otherwise found in STR# 4000), 9100 and up to patch the lowercase cargo name (otherwise found in STR# 4001), and 9200 and up to patch the status display abbreviation of the cargo name (otherwise found in STR# 4002). Remember that the index of the cargo you're trying to patch (or add) is to be added to the base ID to obtain the ID to give to your STR, and that if you add a new mission cargo, you should of course avoid an already used index, or missions from Nova which use this cargo index will use your new cargo (which has no implication other than the name, but still it's odd to carry something else that what you've signed up to carry), so as the STR# ID 4000 contains 79 entries, this means (as the first entry has index 0, so the last has index 78) you have to make your STR resources with IDs of 9079, 9179 and 9279. And, of course, enter 79 in the cargoType field of your mission.

      Attentive people may notice that there are 255 possible cargo indexes, which means the patching mechanism here is incomplete (only allowing patchin for the first 100 entries), probably why Matt Burch did not document this for mission cargo (only the 6 main cargo for the prices and status display).

      For those that I wondering how I do know such an underdocumented thing, I just looked for it in the Bible, saw it wasn't there, but that something was fishy (hmm... there is an allusion to using STR ID 900, but it is not present in the list below...), and tested it. Yes, I'm currently trasporting Bastards instead of passengers in Polaris space. 😉

    • Heh zacha...

      but in my opinion thats much more difficult than messing with the STR#.

      Handy patching utilitY? Hardly... its cool to look through all the other cargos, anyway. And notice in the other STR# you can change things like 'credits:' and 'Leave'

    • NebuchadnezzaR, on Feb 10 2005, 07:10 PM, said:

      Heh zacha...

      but in my opinion thats much more difficult than messing with the STR#.

      Handy patching utilitY? Hardly... its cool to look through all the other cargos, anyway. And notice in the other STR# you can change things like 'credits:' and 'Leave'
      View Post

      The point of patching the strings like that is so that you can have multiple plugs which all add new cargo types without overwriting each other. If you just copied the STR# and then wanted to make another plug which also added a new cargo you'd have to include the entry you added in the first plug as well.

      Zacha, the bible says 9400s are the status display abbreviations. Does 9200 do the same thing?

    • Oh, yeah. Forgot about that. Im always pondering TCs. Nevermind then.

    • Guy, on Feb 10 2005, 09:10 PM, said:

      The point of patching the strings like that is so that you can have multiple plugs which all add new cargo types without overwriting each other. If you just copied the STR# and then wanted to make another plug which also added a new cargo you'd have to include the entry you added in the first plug as well.

      Zacha, the bible says 9400s are the status display abbreviations. Does 9200 do the same thing?
      View Post

      Not exactly: 9400-9405 STR IDs patch the "Food:" text for the 6 main cargo types, found in STR# 4004. 9200-9299 patch STR# ID 4002 (see a pattern?), which the text that's found in the "special" section of the status display, the place where is "multiple" if you have more than one special (mission or junk) cargo on board.

    • Zacha Pedro, on Feb 11 2005, 08:59 AM, said:

      Not exactly: 9400-9405 STR IDs patch the "Food:" text for the 6 main cargo types, found in STR# 4004. 9200-9299 patch STR# ID 4002 (see a pattern?), which the text that's found in the "special" section of the status display, the place where is "multiple" if you have more than one special (mission or junk) cargo on board.
      View Post

      Oh right, I see.
      Seems like a waste to have a set of 100 STR s when only 6 of them can be used and we're short elsewhere. Oh well.

    • Yep, that's a shame. That's what happens when things have been set some way at some point and you later on it is realised that it cannot be extended; it happened for instance in EVO for the outfit picts and the big image containing the small versions: it was at an ID that made that it was in the middle of the range of the outfit picts given the number of possible outfits in EVO, which meant the outfit pict that should have been at that ID was at that ID+1, the following one was at one ID more, etc...

    • Very interesting, all. while were discussing this i would also like to know: what is the difference between str and str# type resources. They are both strings right?

    • STR# can consist of several different pstrings, where 'STR ' can only have one of them. Think of it as saying STR# has a number of 'STR 's. Number, like few, not like, well, number. Yeah.

      If you want to get technical, the STR# has a short (2 byte number), followed by that number of pstrings.
      A 'STR ' is merely a pstring.
      A pstring is one byte stating the length of the string (up to 255), followed by that number of character bytes.

      More information than you needed to know, Vader? 😉
      ~ SP

    • that's fine, thanks, but let me clarify: when it says that a string will be randomly selected from str# id XXX than it is actually selecting one of the "sub str#'s" of string id XXX?
      there is about a 62.459678316% chance that I understood that.

    • darth_vader, on Feb 13 2005, 08:01 AM, said:

      that's fine, thanks, but let me clarify: when it says that a string will be randomly selected from str# id XXX than it is actually selecting one of the "sub str#'s" of string id XXX?
      there is about a 62.459678316% chance that I understood that.
      View Post

      Yes. A STR# is a collection of STR s. I think that's all you wanted to know.

    • SpacePirate, on Feb 12 2005, 02:08 AM, said:

      STR# can consist of several different pstrings, where 'STR ' can only have one of them. Think of it as saying STR# has a number of 'STR 's. Number, like few, not like, well, number. Yeah.

      If you want to get technical, the STR# has a short (2 byte number), followed by that number of pstrings.
      A 'STR ' is merely a pstring.
      A pstring is one byte stating the length of the string (up to 255), followed by that number of character bytes.

      More information than you needed to know, Vader? 😉
      ~ SP
      View Post

      No to mention the differences between Cstrings and PASCAL strings (pstrings). Not to mention CFStrings. Now imagine that Mac Carbon programming requires juggling between all three of them... Fortunately I'm now able to get rid of pstrings when I prgram, at least.

    • What do pstrings etc. have to do with the Nova strings? and if an Str# is a collection of Str's, then why are there both included in Nova's design?

    • darth_vader, on Feb 16 2005, 05:23 PM, said:

      What do pstrings etc. have to do with the Nova strings? and if an Str# is a collection of Str's, then why are there both included in Nova's design?
      View Post

      Because sometimes it's more useful/easy to have one STR by itself, rather than grouping a bunch of unrelated STR s together into one big STR#.