Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
New threads (complete scripts) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.
![]() ![]() |
Aug 9 2010, 01:53 AM
Post
#1
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
This script presents a new way of fusing items. Any item can serve as "Item A". Then, any item can be fused into this and have a different effect based on a tag in the notebox. (e.g. if a potion is used as Item B then Item A will restore 10 extra hp, no matter the original effect). Currently only numeric effects are supported. In the future any change to an item will be possible. Item B may also be cursed (i.e. have a negative effect). No matter what order items are fused in, the same base item A and combination of item Bs will produce the same product, and use the same slot in the items page.
Note that, when using this script, loading a previous save will not work if the database has been changed - you will have to start a new game. Instructions/description also included in the script. Spoiler: Feel free to use (with credit) in free projects. If anyone ever bothers with a commercial project pm me and we'll talk. This post has been edited by mithos: Aug 25 2010, 12:40 AM -------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
Aug 9 2010, 08:27 AM
Post
#2
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Currently, the synthed items are not saved with the game data, so simply saving and loading the game will break the script. You could dump all of the $data_xxx arrays dealing with items when the file is saved, but I recommend instead saving the uniquely created items into a hash within a class that is saved already (eg., Game_System, as sort of a 'backup') and, when the save data is loaded, simply change the $data_xxx arrays at that point to reflect the items.
-------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Aug 9 2010, 09:55 AM
Post
#3
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
Thanks for that - knew I'd miss something, and I never tested saving
Thanks Mithran I'll get on that tonight. -------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
Aug 9 2010, 02:55 PM
Post
#4
|
|
![]() I'm still smiling. My jaw hurts now. ![]() Type: Coder Alignment: Neutral Good |
i'm just wondering why are there some lines that are commented out?
also, good thing this thread was approved even with just the script... -------------------- Spoiler: Scripts/Snippets: Exclude Player in Party | Bag Pockets |Custom Iconset Size | Moghunter's Title Screen forum elf - Gameover Screen | Shop Modes | NIS Designs Uno | Monster Breeding System |
|
|
|
Aug 9 2010, 05:25 PM
Post
#5
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
The commented lines are the beginning of a naming system for created items.
Also I found a bug while testing for the one Mithran noticed - just a display error in the synthesis windows - my fault. should fix both of those today. -------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
Aug 9 2010, 05:44 PM
Post
#6
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
Update: bugs all fixed - this is now usable.
-------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
Aug 11 2010, 09:44 AM
Post
#7
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
I would actually perfer this to be a bit closer to the completed scripts format. The main point is that it should have some kind of unspoiler'd description at the top for everyone to read as soon as they click in, even if its only a sentence or two.
I see you fixed the saving issue by Marshalling all the data arrays dealing with items. This works, but it opens up the issue that any time you alter or add an item in the database, you'd have to start a new save in order to use the updated items. Not much of an issue, but could get annoying. Also, you might want to double-check your probability function. Before you even hit 10, the numbers are so small that not even multiplying them by ten million will get you a whole integer to use for an id, they are so insiginficant as to become 0.0 before the multiplication even takes place. You also might want to rethink the approach of using the default database and integer ids - if you can resynth items, you essintally have an unlimited number of possible combinations and a finite number of possible ids, you will overlap at some point. -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Aug 11 2010, 07:27 PM
Post
#8
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
awwwwwwwwww! I spent ages trying to find a method of making unique ID numbers without heading off out of range but still making the same combinations give the same number (the hardest bit of this script). I'd have sworn this worked in irb - will check the script version, or just come up with a new system (again) In response to the point about starting a new save I'm in the habit of starting new every time I change something (normally as I change scripts) and didn't even consider this. I'll put a note in the description. EDIT: just checked in irb - and you're right about the npdf. new system on its way This post has been edited by mithos: Aug 11 2010, 08:03 PM -------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
Aug 24 2010, 05:08 PM
Post
#9
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
well, after much thought and mucking about I suddenly got a flash of insight and remembered high school maths. So I have fixed all of the major bugs, and simplified that horrid function to do with the id's
P.S. I know the cursor doesn't quite look right in the scene. I'm working on it -------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 24th May 2013 - 04:22 AM |
|
|