devolution

Author Topic: <-- Archived -->  (Read 113684 times)

0 Members and 3 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Xela, since we don't have shops and locations, could you create some kind of mechanism for items testing? Like, any item with location name = 'Item Shop' will be in Hinata's inventory when you start a new game or something.

wtf :D

That's already in place for all girls. Take shopping/Equip Items works for all girls and Hinata :) starts with all items labeled 'Item Shop' :D That was in place for two days, I've also posted about that in this forum.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Hm, I wounder why I have a crash after trying to go into her inventory then...
Probably something to do with synax, I'll try to figure it out.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Xela, is it normal that the game ignores ctemp field for consumables?
+++++++++++++++
Ok, I have no idea why it crashes. The thing is, if I just add this item:
Quote
<item
        id="Small Healing Potion"
        icon="content/items/cons/shp.png"
        desc="This simple potion with taste of strawberries draws on the body’s natural

healing ability to cure your wounds."
   
        price = '100'
    sex = 'unisex'
    infinite = 'true'
        chance = '75'
        badness = '100'
    eqchance = '100'
        slot = 'consumable'
        hidden = 'false' >
        <mod health = '25' />

        <location name = 'Item Shop' />
    </item>
then I have a crash after starting a new game:
Quote
File "game/script.rpy", line 2, in script
  File "game/script.rpy", line 6, in python
  File "game/library/pyt - functions.rpy", line 105, in python
  File "game/library/pyt - common.rpy", line 327, in python
  File "game/library/pyt - common.rpy", line 281, in python
ParseError: not well-formed (invalid token): line 62, column 77

And if I remove ' symbol from its description, the crash is gone, however, I already have this symbol in many descriptions above it, so this is beyond me.
« Last Edit: May 18, 2013, 10:07:39 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Xela, is it normal that the game ignores ctemp field for consumables?

No, it is not. I'll take a look at it.

+++++++++++++++
Ok, I have no idea why it crashes. The thing is, if I just add this item:then I have a crash after starting a new game:
And if I remove ' symbol from its description, the crash is gone, however, I already have this symbol in many descriptions above it, so this is beyond me.

You prolly have a poor text editor, try this:

Code: [Select]
    <item
        id="Small Healing Potion"
        icon="content/items/cons3.png"
        desc="This simple potion with taste of strawberries draws on the body's natural healing ability to cure your wounds."
   
        price = '150'
        chance = '75'
        badness = '100'
        infinite = 'true'
        slot = 'consumable' >
       
        <mod health = '25' />
        <location name = 'Item Shop' />

    </item>
« Last Edit: May 18, 2013, 10:52:00 AM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
I guess. Tried notepad+, all is working so far.
But the game still ignores ctemp, any effects are permanent. Maybe I put it in a wrong section?
Quote
    <item
        id="Ultimate Mana Potion"
        icon="content/items/cons/ump.png"
        desc="They say many of the greatest magicians in history have earned their fame thanks to this weightless salty substance from another world. When consuming it temporarily fills every corner of the body with magic energy. But this power comes with a price: most souls are not fit for such foreign energies, and excessive use will result in death. Effect lasts for a day."

        price = '2500'
        sex = 'unisex'
        infinite = 'false'
        chance = '10'
        badness = '100'
        eqchance = '40'
        slot = 'consumable'
        hidden = 'true'
        ctemp = '1'  >

        <max mp = '50'     />
        <mod mp = '10000' />
        <mod health = '-35' />
        <max health = '-25' />
        <mod constitution = '-10' />
        <mod fatigue = '20' />
        <max magic = '10' />
        <mod magic = '15' />
        <mod defence = '-5' />
        <location name = 'Item Shop' />
    </item>
« Last Edit: May 18, 2013, 12:28:46 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
I guess. Tried notepad+, all is working so far.
But the game still ignores ctemp, any effects are permanent. Maybe I put it in a wrong section?


Freaking weird with the ctemp field, I am going to try it myself right now...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Besides, even without ctemp any items with cblock field could be used once only, no matter how long you wait.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Besides, even without ctemp any items with cblock field could be used once only, no matter how long you wait.

I've just updated the code. Try it now, ctemp did actually work for me but it threw an error due to a typo in code. You get a very different picture (counters not working at all). Where are you putting ctemp field?
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Alright, now both of them work properly.
However, I either do not understand how to use cmax field, or it doesn't work at all.

Sometimes the game ignores it, but in most cases I get this one:
Quote
  File "game/library/screens/pyt - screens - girlequipment.rpy", line 6, in script
  File "game/library/screens/pyt - screens - girlequipment.rpy", line 21, in python
  File "game/library/pyt - functions.rpy", line 185, in python
  File "game/library/pyt - classes.rpy", line 901, in python
  File "game/library/pyt - classes.rpy", line 1028, in python
I write it like:
        ...
        slot = 'consumable'
        cmax = '100'>
       
        <mod charisma = '35' />
        <location name = 'Item Shop' />
        ...
« Last Edit: May 18, 2013, 01:52:47 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Alright, now both of them work properly.
However, I either do not understand how to use cmax field, or it doesn't work at all.

Sometimes the game ignores it, but in most cases I get this one:I write it like:
        ...
        slot = 'consumable'
        cmax = '100'>
       
        <mod charisma = '35' />
        <location name = 'Item Shop' />
        ...

You understand it just fine...

LoL

It's just me making two mistakes in one line of code... but that's why we do bug-hunting. I need to remember to that accessing stats through __dict__ is no longer possible and I have to use getattr() instead. There are prolly a couple more of similar errors through out the code but we'll kill them all as we betatest.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
I'll try it, but meanwhile I keep getting crashes
Quote
  File "game/library/screens/pyt - screens - girlequipment.rpy", line 6, in script
  File "game/library/screens/pyt - screens - girlequipment.rpy", line 21, in python
  File "game/library/pyt - functions.rpy", line 185, in python
  File "game/library/pyt - classes.rpy", line 901, in python
  File "game/library/pyt - classes.rpy", line 1047, in python
AttributeError: 'Item' object has no attribute 'ctem'

 with the item:
Quote
    <item
        id="Elixir of Ultimate Regeneration"
        icon="content/items/cons/eur.jpg"
        desc="Created by master alchemist in ancient times, this mighty potion instantly causes the drinker's body to regenerate all lost limbs, heal all physical wounds, cure all illnesses, and erase any scars. The process is extremely exhausting physiologically and may require a convalescence period."
   
        price = '6000'
        sex = 'unisex'
        chance = '2'
        badness = '0'
        eqchance = '50'
        infinite = 'false'
        hidden = 'true'
        slot = 'consumable' >
       
        <mod health = '10000' />
        <mod joy = '-100' />
        <mod fatigue = '200' />
        <removeeffect name = 'Poisoned' />
        <removetrait name = 'Small Scars' />
        <removetrait name = 'Scars' />
        <removetrait name = 'Cool Scars' />
        <removetrait name = 'Horrific Scars' />
        <removetrait name = 'Caught a Cold' />
        <location name = 'Item Shop' />
    </item>
When I removed all these trait and effect removers, crashes are gone.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
I'll try it, but meanwhile I keep getting crashes
 with the item:When I removed all these trait and effect removers, crashes are gone.

Another typo, should say 'ctemp' in code... try it now.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Looks like Elixir no longer crashes the game, but any cmax field immediately does when I try to launch Pytfall.
Quote
  File "game/script.rpy", line 2, in script
  File "game/script.rpy", line 6, in python
  File "game/library/pyt - functions.rpy", line 105, in python
  File "game/library/pyt - common.rpy", line 327, in python
  File "game/library/pyt - common.rpy", line 281, in python
ParseError: duplicate attribute: line 231, column 2

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Oh, before I keep forgetting:

This might be useful for betatesting:

Shift + O or Tilde to open game's console.

Then these commands:
char['Hinata'].applytrait('Trait Name Here')
char['Hinata'].removetrait('Trait Name Here')
char['Hinata'].mp = 100 (for any stat)
char['Hinata'].max['mp'] = 100 (for any stat, max or min)
char['Hinata'].inventory.append('Item Name here')
char['Hinata'].equip('Item Name Here') (Item must be present in inventory or game will throw an Error)
char['Hinata'].unequip('Item Name Here') (Item must be equipped)
« Last Edit: May 18, 2013, 02:49:12 PM by Xela »
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Looks like Elixir no longer crashes the game, but any cmax field immediately does when I try to launch Pytfall.

That's a parsing Error, you have cmax in one of the items twice (line 231 of the items.xml should be the second entry)
Like what we're doing?