Hey everyone!
I'm a lifelong novice programmer and am brand new to the SWGEMU scene, as well as having 0 experience with LUA. I've decided to come up with a few small projects to work on just to get my feet wet.
The first, which I believe I have completed, was adding action dots, identical to the dots done by flamethrowers, to the heavy acid rifle. Short of copying the dot code from the flamethrower single/cone LUA files to the acid single/cone LUA files, and changing HEALTH to ACTION, is there anything else I'll need to do somewhere?
My next plan, though, seems a bit more complex, and I have some questions. I have noticed the game breaks items up into different groups, and that different groups have different attributes. Because of this, you can pull up the radial menu for all containers, and set a new name to them. Is it possible to copy this property(renaming an item) to another group of items? I would like to set it so that all CAs and AAs are renamable. Where I am getting confused is on the basic file structure of SWGEMU, and what is stored server side vs client side. My first thought was going in to look at a container(i looked up the cargo pocket), and see if i could look through the code of it like i did for the flame thrower and find out what part renames it). I initially found the cargo pocket in the scripts folder, but that LUA seemed to reference a file in the /object/tangible/container directory. After looking at the files there, though, I don't see any file that would dictate properties of the containers, like available space, etc..
Is setting CAs/AAs to be able to be renamed something that can be done serverside, or does it have to be done client side? Am I looking in the wrong place for the files that dictate attributes of a group? I feel like I'm close, but that usually means im not even in the ballpark :S . Any help would be much appreciated, thanks!
*edit*
Actually, it looks like I found the objects.lua file in the folders here, and it appears to set some parameters. Now I am trying to find out which one allows it to be renamed.
*edit2* found this in /src/server/zone/objects/tangible/ContainerImplementation.cpp, looks like it might be the code for setting the name of an item. Now I need to figure out how to take this code and turn it into a radial item for armor attachments/clothing attachments, which I think are called gems in the code>?
int ContainerImplementation::handleObjectMenuSelect(CreatureObject* player, byte selectedID) {
if (selectedID == 50) {
if (checkContainerPermission(player, ContainerPermissions::MOVECONTAINER && getParent().get() != NULL &&
getParent().get()->checkContainerPermission(player, ContainerPermissions::MOVEOUT))) {
ManagedReference<SuiInputBox*> inputBox = new SuiInputBox(player, SuiWindowType::OBJECT_NAME, 0x00);
inputBox->setPromptTitle("@sui:set_name_title");
inputBox->setPromptText("@sui:set_name_prompt");
inputBox->setUsingObject(_this.getReferenceUnsafeStaticCast());
inputBox->setMaxInputSize(255);
inputBox->setDefaultInput(getCustomObjectName().toString());
player->getPlayerObject()->addSuiBox(inputBox);
player->sendMessage(inputBox->generateMessage());
return 0;
}
I'm a lifelong novice programmer and am brand new to the SWGEMU scene, as well as having 0 experience with LUA. I've decided to come up with a few small projects to work on just to get my feet wet.
The first, which I believe I have completed, was adding action dots, identical to the dots done by flamethrowers, to the heavy acid rifle. Short of copying the dot code from the flamethrower single/cone LUA files to the acid single/cone LUA files, and changing HEALTH to ACTION, is there anything else I'll need to do somewhere?
My next plan, though, seems a bit more complex, and I have some questions. I have noticed the game breaks items up into different groups, and that different groups have different attributes. Because of this, you can pull up the radial menu for all containers, and set a new name to them. Is it possible to copy this property(renaming an item) to another group of items? I would like to set it so that all CAs and AAs are renamable. Where I am getting confused is on the basic file structure of SWGEMU, and what is stored server side vs client side. My first thought was going in to look at a container(i looked up the cargo pocket), and see if i could look through the code of it like i did for the flame thrower and find out what part renames it). I initially found the cargo pocket in the scripts folder, but that LUA seemed to reference a file in the /object/tangible/container directory. After looking at the files there, though, I don't see any file that would dictate properties of the containers, like available space, etc..
Is setting CAs/AAs to be able to be renamed something that can be done serverside, or does it have to be done client side? Am I looking in the wrong place for the files that dictate attributes of a group? I feel like I'm close, but that usually means im not even in the ballpark :S . Any help would be much appreciated, thanks!
*edit*
Actually, it looks like I found the objects.lua file in the folders here, and it appears to set some parameters. Now I am trying to find out which one allows it to be renamed.
*edit2* found this in /src/server/zone/objects/tangible/ContainerImplementation.cpp, looks like it might be the code for setting the name of an item. Now I need to figure out how to take this code and turn it into a radial item for armor attachments/clothing attachments, which I think are called gems in the code>?
int ContainerImplementation::handleObjectMenuSelect(CreatureObject* player, byte selectedID) {
if (selectedID == 50) {
if (checkContainerPermission(player, ContainerPermissions::MOVECONTAINER && getParent().get() != NULL &&
getParent().get()->checkContainerPermission(player, ContainerPermissions::MOVEOUT))) {
ManagedReference<SuiInputBox*> inputBox = new SuiInputBox(player, SuiWindowType::OBJECT_NAME, 0x00);
inputBox->setPromptTitle("@sui:set_name_title");
inputBox->setPromptText("@sui:set_name_prompt");
inputBox->setUsingObject(_this.getReferenceUnsafeStaticCast());
inputBox->setMaxInputSize(255);
inputBox->setDefaultInput(getCustomObjectName().toString());
player->getPlayerObject()->addSuiBox(inputBox);
player->sendMessage(inputBox->generateMessage());
return 0;
}