Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Other MMORPG Hacks › Terraria Hacks › Question regarding IDs/names and editing them

QuestionQuestion regarding IDs/names and editing them

Posts 1–3 of 3 · Page 1 of 1
DE
deavis
Question regarding IDs/names and editing them
Hi all,

I was wondering if you have any better solution other than the one I'm currently using for comparing IDs to names.

I used to code in C# long time ago, and coming back to it from JS is rather strange for me, i have following code for comparing names with it's actual ID
Code:
                List<dynamic> list = new List<dynamic>();
                foreach (System.Reflection.FieldInfo prop in typeof(NPCID).GetFields()) {
                    if (prop.Name.Contains(parameter)) {
                        dynamic expando = new System.Dynamic.ExpandoObject();
                        expando.name = prop.Name;
                        expando.id = prop.GetValue(prop);
                        list.Add(expando);
                    }
                }
                if(lis*****unt() > 1) { 
                    Main.NewText("Found many monsters under that name, could not spawn.");
                    foreach (var i in list) {
                        Main.NewText(string.Format("{0}: {1}", i.id, i.name));
                    }
                } else if ( lis*****unt() == 1){
                    NPC.NewNPC((int)player.position.X, (int)player.position.Y, list[0].id);
                    Main.NewText(string.Format("Successfully spawned npc"));
                }
Second question I have - If i remember correctly, there was an option in old terraria versions to spawn NPCs client side on the server, so everybody could see & attack them, but now if i spawn anything it dissappears. Same goes for item editing, when i drop my custom edited item, eg. i set sword's damage to 1000, the item goes back to it's original state. I assume it's because these items have a function SetDefaults set when it's picked up, but not sure.

Third question - Didn't actually test that, but when i want to edit my items, to get the actual item held, the function is Main.player[Main.myPlayer].HeldItem. Is it possible to set Main.myPlayer to other player ID so i can view/edit their items as well? Is it possible from the client side or do I need to edit the server and add custom commands?
#1 · 6y ago
DA
DARTH WANKSTAIN
Quote Originally Posted by deavis View Post
Hi all,

I was wondering if you have any better solution other than the one I'm currently using for comparing IDs to names.

I used to code in C# long time ago, and coming back to it from JS is rather strange for me, i have following code for comparing names with it's actual ID
Code:
                List<dynamic> list = new List<dynamic>();
                foreach (System.Reflection.FieldInfo prop in typeof(NPCID).GetFields()) {
                    if (prop.Name.Contains(parameter)) {
                        dynamic expando = new System.Dynamic.ExpandoObject();
                        expando.name = prop.Name;
                        expando.id = prop.GetValue(prop);
                        list.Add(expando);
                    }
                }
                if(lis*****unt() > 1) { 
                    Main.NewText("Found many monsters under that name, could not spawn.");
                    foreach (var i in list) {
                        Main.NewText(string.Format("{0}: {1}", i.id, i.name));
                    }
                } else if ( lis*****unt() == 1){
                    NPC.NewNPC((int)player.position.X, (int)player.position.Y, list[0].id);
                    Main.NewText(string.Format("Successfully spawned npc"));
                }
Second question I have - If i remember correctly, there was an option in old terraria versions to spawn NPCs client side on the server, so everybody could see & attack them, but now if i spawn anything it dissappears. Same goes for item editing, when i drop my custom edited item, eg. i set sword's damage to 1000, the item goes back to it's original state. I assume it's because these items have a function SetDefaults set when it's picked up, but not sure.

Third question - Didn't actually test that, but when i want to edit my items, to get the actual item held, the function is Main.player[Main.myPlayer].HeldItem. Is it possible to set Main.myPlayer to other player ID so i can view/edit their items as well? Is it possible from the client side or do I need to edit the server and add custom commands?
Main.player has every player object, loop through those to edit their items, but note it has no affect for them, only you can see it.
Spawning client sided npcs is most likely still a thing, but you can't make other people see them unless you're smart with it, like spawning beehive projectiles to spawn bees.
#2 · 6y ago
fozgod
fozgod
Quote Originally Posted by deavis View Post
Hi all,

I was wondering if you have any better solution other than the one I'm currently using for comparing IDs to names.

I used to code in C# long time ago, and coming back to it from JS is rather strange for me, i have following code for comparing names with it's actual ID
Code:
                List<dynamic> list = new List<dynamic>();
                foreach (System.Reflection.FieldInfo prop in typeof(NPCID).GetFields()) {
                    if (prop.Name.Contains(parameter)) {
                        dynamic expando = new System.Dynamic.ExpandoObject();
                        expando.name = prop.Name;
                        expando.id = prop.GetValue(prop);
                        list.Add(expando);
                    }
                }
                if(lis*****unt() > 1) { 
                    Main.NewText("Found many monsters under that name, could not spawn.");
                    foreach (var i in list) {
                        Main.NewText(string.Format("{0}: {1}", i.id, i.name));
                    }
                } else if ( lis*****unt() == 1){
                    NPC.NewNPC((int)player.position.X, (int)player.position.Y, list[0].id);
                    Main.NewText(string.Format("Successfully spawned npc"));
                }
Second question I have - If i remember correctly, there was an option in old terraria versions to spawn NPCs client side on the server, so everybody could see & attack them, but now if i spawn anything it dissappears. Same goes for item editing, when i drop my custom edited item, eg. i set sword's damage to 1000, the item goes back to it's original state. I assume it's because these items have a function SetDefaults set when it's picked up, but not sure.

Third question - Didn't actually test that, but when i want to edit my items, to get the actual item held, the function is Main.player[Main.myPlayer].HeldItem. Is it possible to set Main.myPlayer to other player ID so i can view/edit their items as well? Is it possible from the client side or do I need to edit the server and add custom commands?
To answer the custom item spawning thing ur trying to do it is possible because the server can spawn custom items but if ur trying to do it from ur client to the server for other players its a no go cause the server will check to see if ur host or just a client if ur a client it returns also btw if u sync the item to the server it will like update it like 7 times it seems like cause i can spawn a item with a invalid prefix but the server will shuffle through prefixes till its valid
#3 · 6y ago
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

  • looking for some assistance in regards to assets and updating themBy willfuttbuck in Realm of the Mad God Help & Requests
    6Last post 8y ago
  • For questions regarding social engineering and refundingBy Psychotic in Marketplace Talk
    0Last post 10y ago
  • How to take flash games off any website and edit themBy ry4ntheman in General
    4Last post 16y ago
  • A few questions regarding MW2 Liberation and VACBy vanFail in Call of Duty Modern Warfare 2 Help
    6Last post 12y ago
  • Some questions regarding RE's and menus in generalBy jeppeake in DayZ Help & Requests
    7Last post 13y ago

Tags for this Thread

None