Hi again. Have a question

xuichichi

New Member
Joined
Oct 27, 2015
Messages
11
So this is my second post here, never got around to doing my idea from the first one. I have however, come quite a long way. :) Time to enlist help of people more intelligent than I am though. Probably behind the times here I'm sure but I'm trying to go about adding a weapon schematic for the Two-Handed Sith Sword in this case and eventually the rest of the other CU/NGE weapons. When I try to generate the schematic in the /object createitem command I get a message saying something to the effect of 'createitem' can't create the item because the template can't be found. Through a tremendous amount of double checking and a lot of cross referencing I came to the conclusion what I needed was something to the effect of:

object_tangible_loot_loot_schematic_shared_death_watch_pistol_de10_schematic = SharedTangibleObjectTemplate:new {
    clientTemplateFileName = "object/tangible/loot/loot_schematic/shared_death_watch_pistol_de10_schematic.iff"
    --Data below here is deprecated and loaded from the tres, keeping for easy lookups
--[[
    appearanceFilename = "appearance/eqp_tool_engineering_analysis_board.apt",
    arrangementDescriptorFilename = "",

    certificationsRequired = {},
    clearFloraRadius = 0,
    clientDataFile = "",
    clientGameObjectType = 8211,
    collisionActionBlockFlags = 0,
    collisionActionFlags = 51,
    collisionActionPassFlags = 1,
    collisionMaterialBlockFlags = 0,
    collisionMaterialFlags = 1,
    collisionMaterialPassFlags = 0,
    containerType = 0,
    containerVolumeLimit = 1,
    customizationVariableMapping = {},

    detailedDescription = "@craft_item_ingredients_d:pistol_de_10_schematic",

    gameObjectType = 8211,

    locationReservationRadius = 0,
    lookAtText = "string_id_table",

    noBuildRadius = 0,

    objectName = "@craft_item_ingredients_n:pistol_de_10_schematic",
    onlyVisibleInTools = 0,

    paletteColorCustomizationVariables = {},
    portalLayoutFilename = "",

    rangedIntCustomizationVariables = {},

    scale = 1,
    scaleThresholdBeforeExtentTest = 0.5,
    sendToClient = 1,
    slotDescriptorFilename = "",
    snapToTerrain = 1,
    socketDestinations = {},
    structureFootprintFileName = "",
    surfaceType = 0,

    targetable = 1,
    totalCellNumber = 0,

    useStructureFootprintOutline = 0,

    clientObjectCRC = 44057344,
    derivedFromTemplates = {"object/object/base/shared_base_object.iff", "object/tangible/base/shared_tangible_base.iff"}
]]
}

ObjectTemplates:addClientTemplate(object_tangible_loot_loot_schematic_shared_death_watch_pistol_de10_schematic, "object/tangible/loot/loot_schematic/shared_death_watch_pistol_de10_schematic.iff")

but of course with my weapon instead. The bolded CRC there troubled me for quite some time just figuring out how that number came to be. I had been using SIE and found that the number listed there is in base-10 and needed to be converted to base-16. Win. Anyway, intially I didn't even know I needed what's above me here as oppossed to just in that particular objects.lua.

object_tangible_loot_loot_schematic_shared_2h_sword_sith_schematic = SharedTangibleObjectTemplate:new {
    clientTemplateFileName = "object/tangible/loot/loot_schematic/shared_2h_sword_sith_schematic.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_loot_loot_schematic_shared_2h_sword_sith_schematic, "object/tangible/loot/loot_schematic/shared_2h_sword_sith_schematic.iff")


All I had to reference in making this was the deeds for the atat house, yoda house etc which are indeed spawnable on the server I'm on with the /object createitem command. All of the deeds only have the above line here instead of what I posted for the DE-10. So I dunno if house deeds are different somehow? Off-track again. The whole reason I'm here is because I am unsure how to get the new clientObjectCRC for my Sith Sword so I can make this schematic work.


So if someone could please shed some light for me I would greatly appreciate it and I apologize if this thread is all over the place it's been a long day haha.
 

Lasko

Moderator
Staff member
Moderator
Joined
Feb 13, 2012
Messages
295
Just a quick response here (I'm away for the weekend), crc's are found/stored in the tre files in:

/misc/object_template_crc_string_table.iff

Every object listed in the /object folder and subdirs has one and they wont work without one.

Open SIE and open the crc editor and you'll see it's pretty straight forward. If you add a new item then you have to add the crc here.

If your gonna add a new draft schem then your going to have to add a new draftschem.iff for the item, like the NGE houses. Look at the format and copy. You will also need to add them to the datatables, string files and Luas to make them work.

Sorry its a bit short but i'll expand if needed when I get back.

Alternatively, you may want to hope on irc as there are a couple of people there that may be able to give you more info.

GL:)
 

xuichichi

New Member
Joined
Oct 27, 2015
Messages
11
Lasko said:
Just a quick response here (I'm away for the weekend), crc's are found/stored in the tre files in:

/misc/object_template_crc_string_table.iff

Every object listed in the /object folder and subdirs has one and they wont work without one.

Open SIE and open the crc editor and you'll see it's pretty straight forward. If you add a new item then you have to add the crc here.

If your gonna add a new draft schem then your going to have to add a new draftschem.iff for the item, like the NGE houses. Look at the format and copy. You will also need to add them to the datatables, string files and Luas to make them work.

Sorry its a bit short but i'll expand if needed when I get back.

Alternatively, you may want to hope on irc as there are a couple of people there that may be able to give you more info.

GL:)
Thanks for the response! I suppose my real problem is I don't know how to come up with whatever the crc needs to be for my new item(s). I'll mess around with it more tonight but I do already have the luas done and I want to say the iff as well. I did not know about the datables and string files however.
 

Arioch

Member
Joined
Apr 22, 2014
Messages
123
You dont enter the crc, you enter the text needed and it will generate in the table in SIE
 

xuichichi

New Member
Joined
Oct 27, 2015
Messages
11
Alright so the only thing I need to do yet (at least I think) is the string files and datables portion. I loaded up SIE and for the datables I found the crafting section but it only had schematics that are automatically learned in Weaponsmith and the other professions. So I'm not sure exactly which string file or datables I need to be adding to. Not sure if it makes a difference either but I want this to be a looted schematic similar to the DE-10 for example.
 

Arioch

Member
Joined
Apr 22, 2014
Messages
123
As far as that crc in the original post, Dont worry about htat. it should be commented out and the actual crc should be different. I didnt edit any datatables or strings to add weapons to my environment. If you are adding a new schematic though, it MUST be added to this file - scripts/managers/crafting/schematics.lua - this is a master list of all schematics in your environment, if its not here, it may as well not exist. There may be a database you need to rebuild too if that doesnt work, cant remember for sure on that one.
 

xuichichi

New Member
Joined
Oct 27, 2015
Messages
11
Arioch said:
As far as that crc in the original post, Dont worry about htat. it should be commented out and the actual crc should be different. I didnt edit any datatables or strings to add weapons to my environment. If you are adding a new schematic though, it MUST be added to this file - scripts/managers/crafting/schematics.lua - this is a master list of all schematics in your environment, if its not here, it may as well not exist. There may be a database you need to rebuild too if that doesnt work, cant remember for sure on that one.
I had added it to that lua already and it still isn't working. I'll list the errors that are coming up a bit later when I try and start my test server. I just really feel like I am missing something.
 

xuichichi

New Member
Joined
Oct 27, 2015
Messages
11
I'll list the errors in the order they appear

[26s] Loading templates: [1%] file:scripts/object/custom_content/draft_schematic/weapon/2h_sword_sith.lua ERROR ...tom_content/draft_schematic/weapon/2h_sword_sith.lua:1: attempt to index global 'object_draft_schematic_weapon_shared_2h_sword_sith' (a nil value)

[30s] file:scripts/object/custom_content/weapon/melee/2h_sword_sith.lua ERROR ...object/custom_content/weapon/melee/2h_sword_sith.lua:1: attempt to index global 'object_weapon_melee_shared_2h_sword_sith' (a nil value)

[59s] Loading templates: [81%] (59 s) [TreeArchive] ERROR - Did not find fileName: shared_2h_sword_sith_schematic.iff

[76s] (76 s) [Lua] Loaded 0 schematics from scripts
file:scripts/loot/custom_loot/items/draft_schematics/2h_sword_sith.lua ERROR cannot open scripts/loot/custom_loot/items/draft_schematics/2h_sword_sith.lua: No such file or directory

file:scripts/loot/custom_loot/groups/draft_schematics/g_2h_sword_sith_schematic.lua ERROR attempt to index a nil value

I noticed that they all say a nil value so I don't know if that means I maybe typed something wrong somewhere? One thing I will say, the server I play on lists any additional things we've added under a custom_content folder in it's respective folder I.E /objects/custom_content/weapon/ranged. I noticed in all of the NGE houses none of them reference the actual custom_content portion. I left them out of everything I did as well although I feel like they should be in. Anyway. maybe this can help someone let me know what I need to fix. In the mean time I'll continue to try some things on my own. Thanks again!
 

Arioch

Member
Joined
Apr 22, 2014
Messages
123
26s looks like its either missing a crc or a typo in the objects.lua or serverobjects.lua. Its not recognizing it somewhere. Most likely a typo.

30s same. (nil value) means it cant find a file. Most likely a typo.

59s error is in the tre file. it appears to be missing the mentioned .iff. could be a typo in the .iff

76s either a typo or error in the file path.

nil value again same as above.
 

xuichichi

New Member
Joined
Oct 27, 2015
Messages
11
Arioch said:
26s looks like its either missing a crc or a typo in the objects.lua or serverobjects.lua. Its not recognizing it somewhere. Most likely a typo.

30s same. (nil value) means it cant find a file. Most likely a typo.

59s error is in the tre file. it appears to be missing the mentioned .iff. could be a typo in the .iff

76s either a typo or error in the file path.

nil value again same as above.
Alright I'll double check everything again. I know I'm missing something easy.
 
Top Bottom