devolution

Author Topic: General Discussion  (Read 3821390 times)

0 Members and 61 Guests are viewing this topic.

Offline CherryWood

  • Hero Member
  • *****
  • Posts: 643
Re: General Discussion
« Reply #1470 on: January 21, 2014, 07:01:04 PM »
What I must write in game console to set the "chr" to be the girl I want? Like, how to get commands like chr.disposition or hero.add_girl(chr) to target Sakura?
« Last Edit: January 21, 2014, 07:21:18 PM by CherryWood »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #1471 on: January 22, 2014, 03:03:45 AM »
What I must write in game console to set the "chr" to be the girl I want? Like, how to get commands like chr.disposition or hero.add_girl(chr) to target Sakura?

Code: [Select]
chr = char["Sakura"]

Actually "chr" is a poor name for a variable since it's a python built-in. I'll get rid of it on major code review after Alpha.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #1472 on: January 22, 2014, 03:43:07 PM »
I updated these girls you wanted

Great job, I got them :)

I've wrote some code to normalize girls on entry, there might be some mistakes but we'll root them out.

Removed a bunch of outdated code from Arena and SlaveMarket (I've recently learned how to do the same thing better and faster). Girls for slavemaket are better randomized and unique girls will appear on the same rights as random once (it was almost impossible to get unique girl with loads of randoms around).

Bug reported by Jake is squashed in SlaveMarket and Profile screens.

Wage and other fin methods have been improved.

Arena's 1v1 dodfights will have a full compliment of fighters now.

Thats two more things crossed off the TODO list. I'll push in few seconds.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #1473 on: January 22, 2014, 06:58:02 PM »
Didn't expect there to be one, but one last post for tonight:

I've added paging (8 girls per page) to girls list. Now it will work even with 400+ girls (game would fail after 50 - 100 in the past, depending on PC).

longint has introduced city event system, you can now meet a beggar who might rob you blind (as an example of the event) :) I didn't get a chance to take a look at the code yet, but it seems like a lot of fun with loads of potential.

Everything is included in my last push. Goodnight :)
Like what we're doing?

Offline CherryWood

  • Hero Member
  • *****
  • Posts: 643
Re: General Discussion
« Reply #1474 on: January 23, 2014, 03:45:24 AM »
I don't think it's a good idea to show events from city screen like that. I would prefer to have common gameplay tasks like shopping undisturbed, unless it's a part of a story. Also events can happen one after another now (you meet a beggar and immediately a bandit).


Also, I t would be good to run events from separate files (co they could be distributed with girl pack), it is possible?


« Last Edit: January 23, 2014, 04:12:17 AM by CherryWood »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #1475 on: January 23, 2014, 05:51:30 AM »
I don't think it's a good idea to show events from city screen like that. I would prefer to have common gameplay tasks like shopping undisturbed, unless it's a part of a story. Also events can happen one after another now (you meet a beggar and immediately a bandit).

I actually love spontaneous events like that, they add a lot to the game if coded to be non-repetitive and not to frequent. Two events in sequence is a bug, we'll get rid of that. As for undisturbed, we could add an item that would allow teleportation to shops?

Also, I t would be good to run events from separate files (co they could be distributed with girl pack), it is possible?

It should be made possible, events themselves should be moved to Ren'Py script and distributed as labels, not Python code. Maybe event manager can be written in Python...

The idea is to make it possible for normal users to create content, like you, without programming experience, wrote many lines for girlsmeets. New versions of Ren'Py allow creating custom Ren'Py statements as well, which we will make use of to make modding even more convenient...

Also, Ren'Py script while being as easy as can be, enables insane amount of options and styling. In either case, while this event system has been coded really well in Python (longint is a very capable programmer), we'll have to either greatly expand on it or take a different approach.
Like what we're doing?

Offline longint

  • Newbie
  • *
  • Posts: 6
Re: General Discussion
« Reply #1476 on: January 23, 2014, 02:47:38 PM »
I don't think it's a good idea to show events from city screen like that. I would prefer to have common gameplay tasks like shopping undisturbed, unless it's a part of a story. Also events can happen one after another now (you meet a beggar and immediately a bandit).

OK, maybe some events better to add through 'Look around' action. And it will also decrease your AP, so it will be on your choice and not by random occasion.
It's my mistake that events can happen simultaneously, I will fix this. though in real life it happens sometimes =)

I actually love spontaneous events like that, they add a lot to the game if coded to be non-repetitive and not to frequent. Two events in sequence is a bug, we'll get rid of that. As for undisturbed, we could add an item that would allow teleportation to shops?

Thanks, I liked that to. We can make ordering with delivery by some messenger (pigeons?). =)
« Last Edit: January 23, 2014, 02:49:45 PM by longint »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #1477 on: January 23, 2014, 05:18:47 PM »
messenger (pigeons?). =)

LoL PyTFall's own online commerce!

---
Next update (from me) will be this weekend (no time to code until then), I'll try to put some time in "behind the scenes" logic.

With that in mind, I would like some opinions tomorrow (Do we actually want "behind the scenes" logic now):

Option 1:
Do nothing, girls remain as they've entered the game.

Option 2:
Stats/Gold/EXP increase randomly and slowly. Maybe assign random job names and workplaces to be used in girlsmeets to add a bit of depth.

Option 3:
Free girls would each get a job, wage, place of work as Python classes (properly simulated) and best residence that they can afford. Girlsmeets will depend in these factors. Basically building up code for the distant future that might add some depth to the game.

--- > I don't want to push this any farther than this for the Alpha release.

So how far should we take this? Basically if it's option one, I can cross another thing of TODO list and work on something else this weekend.
Like what we're doing?

Offline longint

  • Newbie
  • *
  • Posts: 6
Re: General Discussion
« Reply #1478 on: January 23, 2014, 05:50:41 PM »
I say it option 1. To make it good, in my opinion, it will consume week`s of development (if not more). But feature must be implemented in future, no doubts!

Also, I fixed events (I think  ::) ), and now it will appear only if you push 'Look around' (but it has very low chances to be triggered).
They are my view of code standard for some types of events.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #1479 on: January 24, 2014, 05:32:06 AM »
I say it option 1. To make it good, in my opinion, it will consume week`s of development (if not more). But feature must be implemented in future, no doubts!

Well, then I'll take a look at:

10) Arena
- Find better buttons for the Arena main screen
- Sort out and allow girlsmeets between Arena girls and player (allow recruiting and revisit team-breakups)
- Add NPCs
- Improve messages

The idea of "behind the screens" logic is not just making girlsmeets better but also adding first steps to creating economy, make sure girls have cash to auto-buy items (when that is coded in) and also first step towards creating rival businesses. In any case, most of that is in distant future so we can drop it for the Alpha without to much fuss.

They are my view of code standard for some types of events.

Chance of spontaneous events should be low, chance of "Look Around" events should be a lot higher as long as there is code preventing them to appear to frequently.

They are my view of code standard for some types of events.

It might do for the Alpha, but final version should be something like:

Base event class with:
- basic trigger conditions
- locations
- max frequency (lets say a tuple of "times can be triggered/amount of days")
- name (also prolly the label)

Event dispatcher class with:
- array of all events
- tracking
- event registration method
- parent_location tracking
- etc.

pytfall.ed.register_event("meet_beggar_event", locations=["park", "main", ...], freq=(1, 10), conditions=[...]) would create the event from base class and append to the list.

than on every relevant label pytfall.ed.check_events() is ran to figure out if anything can be triggered.

Event itself is fully written in labels. Anyone with skills to code a complex event would know how to bypass registration and append it to dispatcher directly.

Similar to DSE, only better coded :)
Like what we're doing?

Offline CherryWood

  • Hero Member
  • *****
  • Posts: 643
Re: General Discussion
« Reply #1480 on: January 24, 2014, 06:24:02 AM »
How to move images in python block?
 I would like to make a linear transition from:
Code: [Select]
renpy.show(tag, what=self._sprite, at_list=[fighter.Position.Transform, offset], layer=l, zorder=fighter.Position.Z + 0.001)to:
Code: [Select]
renpy.show(tag, what=self._sprite, at_list=[target[0].Position.Transform, offset], layer=l, zorder=target[0].Position.Z + 0.001)


----
btw, I vote for option 1, maybe 2 for warriors in arena ladder. It's a nice idea, but some other things looks more important now.
« Last Edit: January 24, 2014, 08:16:55 AM by CherryWood »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #1481 on: January 24, 2014, 07:19:50 AM »
Like I've said, I didn't really went all that keep into the BE...
Code: [Select]
                                mf = MoveFunction(fighter.Position.Transform.xpos, fighter.Position.Transform.ypos, step.Transform.xpos, step.Transform.ypos, period=self._period)
                           
                            fighter.Position = step
                           
                            fighter.Show(transforms=[Transform(function=mf)], zorder=z)

I think this an example on how characters are moved around in BE.

Did you try to have a fireball fly from one character to another?
Like what we're doing?

Offline CherryWood

  • Hero Member
  • *****
  • Posts: 643
Re: General Discussion
« Reply #1482 on: January 24, 2014, 09:08:21 AM »
HURRAY! It works!
Code: [Select]
                        mf = MoveFunction(fighter.Position.Transform.xpos, fighter.Position.Transform.ypos, target[0].Position.Transform.xpos, target[0].Position.Transform.ypos, period=1)                         
                        renpy.show(tag, what=self._sprite2, at_list=[Transform(function=mf)], layer=l, zorder=fighter.Position.Z + 0.001)
So after I improve graphics a little bit, I will have my first channeling+missile+impact skill  ;)

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #1483 on: January 24, 2014, 09:22:42 AM »
HURRAY! It works!
Code: [Select]
                        mf = MoveFunction(fighter.Position.Transform.xpos, fighter.Position.Transform.ypos, target[0].Position.Transform.xpos, target[0].Position.Transform.ypos, period=1)                         
                        renpy.show(tag, what=self._sprite2, at_list=[Transform(function=mf)], layer=l, zorder=fighter.Position.Z + 0.001)
So after I improve graphics a little bit, I will have my first channeling+missile+impact skill  ;)

Good luck :)

New skills need to be registered twice, once as they are in the assets and second time in my bridge function between pytfall and BE.

I did about the same thing with pseudo-code and Ren'Py's own Move function:

engine-skills.rpy:

Code: [Select]
    class MagicFighterAttackSkill(Skill):
       
        def __init__(self, name="Magic Fighter Attack", command=None, attributes=['magic'], damage=1, cost=1, range=5, sprite=None, pause=0, sfx=None, endTurn=True, hotkey=None, weight=0, special=False):
            self._damage = damage
            self._cost = cost
            self._targets = TargetData.TargetFightersLos(range=range)
            self._sprite = sprite
            self._pause = pause
            self._sfx = sfx
            self._endTurn = endTurn
            self._attributes = attributes
            self._special = special
           
            if command == None:
                command = [("Magic", 5), (name, 0)]
           
            super(MagicFighterAttackSkill, self).__init__(name=name, command=command, hotkey=hotkey, weight=weight)


           
        def SetUpFighter(self, fighter):
            fighter.RegisterStat("Magic", 10)
            fighter.RegisterStat("MP", 10)

        def PerformAction(self, fighter, target):
            if (self.IsAvailable(fighter)):
                if (target != None):
                   
                    fighter.Stats.MP = fighter.Stats.MP - self._cost

                    if self._sfx != None:
                        renpy.music.play(self._sfx, channel="sound", loop=False)
                   
                    face = fighter._battle.GetFacing(fighter.Position, target[0].Position)
                    fighter._battle.ChangeFighterState(fighter, "magic", facing=face)

                    # Make sure that the camera centres on the target before the spell goes off
                    fighter._battle.PointOfInterest(fighter=target[0])
                   
                    if self._sprite != None and self._pause > 0:
                        offset = Transform(xanchor=self._sprite.Anchor[0], yanchor=self._sprite.Anchor[1])
                        tag = "MagicFighterAttackSkill_"+target[0].Tag+"_"+str(renpy.random.random()*1000)
                        l = fighter._battle.GetLayer('Fighters')
                        if not self._special:
                            renpy.show(tag, what=self._sprite, at_list=[target[0].Position.Transform, offset], layer=l, zorder=target[0].Position.Z + 0.001)
                        if self._special == "snipe":
                            renpy.show(tag, what=self._sprite, at_list=[Move((fighter.Position.Transform.xpos, fighter.Position.Transform.ypos, fighter.Position.Transform.xanchor, fighter.Position.Transform.yanchor),
                                                                                                          (target[0].Position.Transform.xpos, target[0].Position.Transform.ypos, target[0].Position.Transform.yanchor, target[0].Position.Transform.yanchor), 0.5)],
                                                                                                           layer=l, zorder=target[0].Position.Z + 0.001)
                        if (_preferences.battle_skip_combat == False):
                            _battle.Pause(self._pause)
                        renpy.hide(tag, layer=l)
                       
                    fighter._battle.Attack(fighter, fighter.Stats.Magic * self._damage, self._attributes, target[0], target[1])
                   
                    fighter._battle.ChangeFighterState(fighter, "default", facing=face)

                   
                    if (self._endTurn):
                        fighter.EndTurn()
                       
        def IsAvailable(self, fighter):
            if fighter.Stats.MP < self._cost:
                return False
            targets = fighter._battle.GetTargetFighters(fighter, self._targets, skill=self)
            if len(targets) > 0:
                return True
            else:
                return False

assets.rpy: (Replacing Fire 2 skill that is active on MC)
Code: [Select]
    Library.Skills.Fire2 = MagicFighterAttackSkill("Fire 2", attributes=['magic', 'fire'], damage=10, cost=8, range=4, sprite=BattleSprite('fire 2', anchor=(0.5, 0.8)), pause=0.8, sfx="content/sfx/sound/be/fire2.wav", special="snipe")
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #1484 on: January 24, 2014, 10:14:05 AM »
I'm totally owned by work this week, did I miss something? We are already making skills for BE without a new BE?  ???