Yeah, just ran into that.
Replacing $intWeightGain with floatval($intWeightGain) on the 1289th line of RPGCharacter.php seems to have worked. Or well, it stopped it from throwing an error-
Yeah, after tracing how it calculates weight gain after defeat thatâs the simplest fix. I havenât run into any other errors yet, so the dungeon part seems to be working fine now. Havenât tried anything else.
I canât buy items it just says " Error: Invalid size specified for this item. " . Donât know what to do.
In shoptransactionbuy.php, remove/comment out lines 22 and 24-27. I didnât test this very much so it might break something else, but the shop should work.
Also, in DataGameUI.php, surround lines 80-84 with an if like this:
if($_SESSION['objRPGCharacter']->getCombat() != null) {
if($_SESSION['objRPGCharacter']->getCombat()["EnemyTeam"] != null && !isset($_SESSION['objCombat'])){
$_SESSION['objCombat'] = new RPGCombat($_SESSION['objRPGCharacter']->getParty(), $_SESSION['objRPGCharacter']->getCombat()["EnemyTeam"], $_SESSION['objRPGCharacter']->getCombat()["FirstTurn"]);
$_SESSION['objCombat']->initiateCombat();
$_SESSION['objRPGCharacter']->setStateID($arrStateValues['Combat']);
}
}
Thatâll get rid of the warning at the top of the page.
Now its says Error: You donât have enough gold for this purchase. xD
Assuming you have enough gold, double check that you didnât make any other changes. If youâre not sure you can redownload that file from the GitHub and redo it.
Double checked, still says that even if i have the gold.
Hereâs what that block should look like. If you made any other changes to that file except this then that might be why.
$intPurchasePrice += $_POST['price'][$i] * $_POST['quantity'][$i];
$tmpItem = new RPGItem($_POST['itemID'][$i]);
//if(isset($_POST['size'][$i]) && in_array($_POST['size'][$i], $arrClothingSizes)){
$tmpItem->setSize($_POST['size'][$i]);
//}
//else{
// $_SESSION['strShopError'] = '<b>Error:</b> Invalid size specified for this item.';
//}
$tmpItem->setQuantity($_POST['quantity'][$i]);
$arrItemsPurchased[] = $tmpItem;
Alright, I can get to the character creation screen and when i submit the character it always gives me this error,
Fatal error : Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table âdbwgrpg.tblpartymemberâ doesnât exist in C:\xampp\htdocs\wgrpg\Database.php:20 Stack trace: #0 C:\xampp\htdocs\wgrpg\Database.php(20): PDO->query(âSELECT strPartyâŚâ) #1 C:\xampp\htdocs\wgrpg\RPGCharacter.php(506): Database->query(âSELECT strPartyâŚâ) #2 C:\xampp\htdocs\wgrpg\RPGCharacter.php(198): RPGCharacter->loadPartyMembers() #3 C:\xampp\htdocs\wgrpg\RPGCharacter.php(253): RPGCharacter->loadRPGCharacterInfo(â204â, true, â0â, â0â, â0â, â0â, â0â, â0â) #4 C:\xampp\htdocs\wgrpg\createCharacter.php(59): RPGCharacter->createNewCharacter(âJimb0kit0â, âtâ, â108â, 152, âFemaleâ, âHeterosexualâ, âShyâ, â1â, â1â, âBrownâ, âShortâ, âBrownâ, âWhiteâ, â0â, â0â, â0â, â0â, â0â, â0â) #5 {main} thrown in C:\xampp\htdocs\wgrpg\Database.php on line 20
but when i back out of this, my character saves and when i load the character it does this,
Fatal error : Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table âdbwgrpg.tblpartymemberâ doesnât exist in C:\xampp\htdocs\wgrpg\Database.php:20 Stack trace: #0 C:\xampp\htdocs\wgrpg\Database.php(20): PDO->query(âSELECT strPartyâŚâ) #1 C:\xampp\htdocs\wgrpg\RPGCharacter.php(506): Database->query(âSELECT strPartyâŚâ) #2 C:\xampp\htdocs\wgrpg\RPGCharacter.php(198): RPGCharacter->loadPartyMembers() #3 C:\xampp\htdocs\wgrpg\RPGCharacter.php(88): RPGCharacter->loadRPGCharacterInfo(â204â) #4 C:\xampp\htdocs\wgrpg\character.php(18): RPGCharacter->__construct(â204â) #5 {main} thrown in C:\xampp\htdocs\wgrpg\Database.php on line 20
Can someone please help me?
Best quick guess is the database didnât import correctly. Iâll try to take a closer look over the weekend if I can, in the meantime try dropping dbwgrpg then recreating and reimporting it. These links might be helpful.
Did you find out what I need to fix? I canât figure it out
Is anyone else doing any sort of modifications to the game? I personally have been working on a 5th floor, as well as a functional gym for improving stats.
I havenât, my assumption is that something either went wrong somewhere when you were setting it up, or somewhere when you were manually changing the files. Try starting over and paying close attention to the database import.
As far as mods, Iâve toyed with the idea, Iâd like to port it to something more maintainable and extensible, with support for easily dropping in mods for things like events. I think that would be a good solution for crowdsourcing without the issues of having a singular gatekeeper with creative control vs. splintered versions at various stages of development. The main roadblock, for me, is that Cryptic hasnât explicitly given permission for something like that, and thereâs no license on the repo. Thatâs also why Iâve been posting where to make modifications instead of posting the modified files, I donât want to run into any (admittedly unlikely) legal issues. If Cryptic adds a license to the repo, thatâs something Iâd consider doing.
I donât know how to add a license to the repository, but Iâll reiterate that people are free to mod the source code however they see fit. I wouldnât even know how to take legal action for that, assuming I did care enough to, but I donât, so thereâs nothing to worry about. Iâm actually just flattered that people put in the effort to run my game offline, let alone try to mod it.
honestly a video for this would be well appreciated, Iâm not very good at things without seeing a demonstration.
Itâs actually really simple. It sounds like you just want to make it public domain, so âUnlicenseâ is what you would pick. Either way, Iâll take you at your word on that, it was mostly just a matter of now wanting to tear apart and rebuild somebody elseâs project without verifying that they were cool with it.
Thanks, Iâve added the Unlicense license to the repository.
Thanks. I forked it, committed the fixes from this thread, and updated the README with a guide to setting it up, with screenshots this time. Hopefully thatâll help anybody who was having trouble.
i followed the instructions on the readme and it lead me to a paradox because i kept going to that specfic zip and it just took me right back to the same one as the readme.
Is there a way to download it from not Github? because i have an error when trying to do such. Or its ok?