Is there a mod that lets you add any item to your inventory?
Item cheat?
Started by
Lehcar
, Apr 23 2010 07:01 PM
12 replies to this topic
#1
Posted 23 April 2010 - 07:01 PM
#2
Posted 24 April 2010 - 06:08 PM
There is supposedly one at Cheathappens, but you need to subscribe in order to download...
#3
Posted 24 April 2010 - 10:21 PM
#4
Posted 25 April 2010 - 10:04 AM
I think the author on cheathappens added manually each item to the script because there isn't any ResourceToString function in the toolset yet. I tried for instance UT_AddItemToInventory(sItemTag, nAmount);
additem.nss - additem.nss(57): Declaration does not match parameters (while compiling var_constants_h.nss)
The main issue is when the user types in runscript additem R"item.uti". The UT_AddItemToInventory function only accepts resources not strings and because you can't convert them you have to hardcode the whole function:
additem.nss - additem.nss(57): Declaration does not match parameters (while compiling var_constants_h.nss)
The main issue is when the user types in runscript additem R"item.uti". The UT_AddItemToInventory function only accepts resources not strings and because you can't convert them you have to hardcode the whole function:
//found on social.bioware
resource StringToResource( string sTemplate )
{ if( sTemplate != "" )
{ sTemplate = StringLowerCase( sTemplate );
if( sTemplate == "chicken.utc" ) return R "chicken.utc";
if( sTemplate == "hurlock.utc" ) return R "hurlock.utc";
// etc for every possible resource.
}
return R "";
}
#5
Posted 25 April 2010 - 10:17 AM
#6
Posted 25 April 2010 - 07:57 PM
@Don_Kain
This mod spawns only merchants but isn't an additem console command.
@Lehcar
I made the additem script:
I would post the whole code but it is too big (1255 lines). I generated it with a php script (could probably be improved some more, but it's working
)
This mod spawns only merchants but isn't an additem console command.
@Lehcar
I made the additem script:
// -----------------------------------------------------------------------------
// additem
// -----------------------------------------------------------------------------
/*
Adds an item to the player
Usage:
runscript additem <item tag> <amount>
<item tag> - Resource of item to add to inventory
<amount> - Amount of this item to add to inventory
Example:
runscript additem gen_im_acc_amu_am17.uti 4
*/
// -----------------------------------------------------------------------------
// hdhd
// -----------------------------------------------------------------------------
I would post the whole code but it is too big (1255 lines). I generated it with a php script (could probably be improved some more, but it's working
//script to generate the StringToResource function, *.uti files have to be exported with the toolset
<?php
$path="c:\exported";
$file="file1.txt";
$fp = fopen($file, 'w');
chdir($path);
fwrite($fp, "resource StringToResource( string sTemplate ) {\n");
fwrite($fp, " if( sTemplate != \"\" ) {\n");
fwrite($fp, " sTemplate = StringLowerCase( sTemplate ); \n");
foreach (glob("*.uti") as $filename) {
fwrite($fp, " if (sTemplate == \"" . $filename . "\") return R\"" . $filename . "\"; \n ");
}
fwrite($fp, " }\n");
fwrite($fp, " return R\"\";\n");
fwrite($fp, "}\n");
#7
Posted 25 April 2010 - 08:03 PM
I would post the whole code but it is too big (1255 lines). I generated it with a php script (could probably be improved some more, but it's working
)
Could always pastebin it if you don't want to post that big of a script in the post. http://paste2.org/new-paste
#8
Posted 25 April 2010 - 08:28 PM
Okay, here's the source http://pastebin.com/sds4hmD7
I also uploaded it on nexus http://www.dragonage...ile.php?id=1131
I also uploaded it on nexus http://www.dragonage...ile.php?id=1131
#9
Posted 25 April 2010 - 08:47 PM
Okay, here's the source http://pastebin.com/sds4hmD7
I also uploaded it on nexus http://www.dragonage...ile.php?id=1131
You're right, that is indeed long.
#10
Posted 25 April 2010 - 08:57 PM
Ahh yes thank you so much!! <3
But I'm not 100% clear on how to use this. Is there someplace where I can find a list what the "tag" for each item is?
But I'm not 100% clear on how to use this. Is there someplace where I can find a list what the "tag" for each item is?



Sign In
Create Account

Back to top








