DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • August 22, 2019, 09:46:04 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Poll
Question: What do you think of this module?
Excellent - 3 (60%)
Good - 2 (40%)
Average - 0 (0%)
Bad - 0 (0%)
Poor - 0 (0%)
Total Voters: 5

Pages: [1]   Go Down
  Print  
Author Topic: File Discussion: Alternative Creatures Editor v0.0.4  (Read 7942 times)
0 Members and 1 Guest are viewing this topic.
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« on: August 21, 2009, 03:01:07 PM »

This is an alternative to the creatures editor in the grotto. The modules that modify creature properties, instead of being listed in the navs when editing a creature, they're shown as tabs. This allows for quicker data input, especially when you have a lot of creatures to deal with.

When adding a creature I've changed the level dropdown menu to check boxes. This allows you to add a creature at different levels in one go. Each creature will have its own ID still.

I've also added and removed some columns.

This module is basically a modified version of the creature editor using a lot of code from the files creatures.php and modules.php and then mixed in a pot and left to simmer for 20 minutes. Smiley

Feedback, bugs etc welcome. Smiley

File Download: Here
File Submission: Here
« Last Edit: July 01, 2013, 09:52:33 AM by Afkamm » Logged

Check My Modules for the latest versions.
bodinxx
Militia
**
Offline Offline

Posts: 24



View Profile
« Reply #1 on: August 22, 2009, 07:46:02 PM »

Great Work.  I installed the module and it worked pretty well....

There is an issue though.  The creature add-on module does not seem to work from  inside the Alternative Creature Editor v0.0.1 ... unless I am doing something wrong.

Any suggestions?
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« Reply #2 on: August 23, 2009, 06:43:10 AM »

Hi bodinxx,

I tracked the problem down and uploaded a new version. Basically if the setting didn't have a default value and no value was given to it by an admin, then the setting wasn't saved in the "oldvalues" array which is also passed when the form is submitted.

Sending the old values allows for old values and new to be compared, only changed values get saved saving on resources. Smiley Took the idea from one of the DP core user files.

Code:
<?php
//
// Line 297
//

// Only saves default value if it exists.
//
if( isset($x[1]) ) $row[$modulename.'-'.$key] = $x[1];

// Fixed code.
//
$row[$modulename.'-'.$key] = ( isset($x[1]) ) ? $x[1] : '';


Thanks for the feedback. Smiley
Logged

Check My Modules for the latest versions.
bodinxx
Militia
**
Offline Offline

Posts: 24



View Profile
« Reply #3 on: August 23, 2009, 02:10:45 PM »

Excellent.  I loved the layout of this module...and was hoping it would work.  I'll install the new version tonight!
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« Reply #4 on: August 23, 2009, 02:54:09 PM »

I'm currently testing a mount editor version. Should be ready in a few days. Smiley

Alternative Mounts Editor. Smiley
« Last Edit: August 27, 2009, 06:22:51 AM by Afkamm » Logged

Check My Modules for the latest versions.
bodinxx
Militia
**
Offline Offline

Posts: 24



View Profile
« Reply #5 on: August 26, 2009, 06:09:17 PM »

With the changes, I love this module!!  Top marks Afkamm!
Logged
bodinxx
Militia
**
Offline Offline

Posts: 24



View Profile
« Reply #6 on: August 28, 2009, 11:45:53 PM »

Found a new bug in the module.  When you enter any AI, it saves the code incorrectly causing a parse error.

The error...
Code:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/syne5901/public_html/lotgd/lib/extended-battle.php(540) : eval()'d code on line 1

Parse error: syntax error, unexpected $end in /home/syne5901/public_html/lotgd/lib/extended-battle.php(540) : eval()'d code on line 1

Saves as
Code:
require(\"ai/Doppelganger.php\");
Instead of
Code:
require("ai/Doppelganger.php");
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« Reply #7 on: August 29, 2009, 09:08:17 AM »

The only difference is that I added addslashes to all submitted creature data where as the original editor didn't do this.

I can see how this can cause problems when stripslashes is not used when a creature is taken out of the database, especially for the AI code.

Code:
<?php
//
// Line: 104
//
$sql .= "$key = '".addslashes($val)."', ";

//
// Replace with:
//
$sql .= "$key = '$val', ";


Thanks. Smiley
Logged

Check My Modules for the latest versions.
bodinxx
Militia
**
Offline Offline

Posts: 24



View Profile
« Reply #8 on: August 29, 2009, 09:42:34 AM »

That seems to have done the trick!
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« Reply #9 on: August 29, 2009, 12:10:07 PM »

I should have added that any AI code that you submitted before will have to get resubmitted again to make sure any added slashes are removed. Smiley
Logged

Check My Modules for the latest versions.
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
107 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search