Author Topic: Hide & Seek - Mini Games in Dungeon Craft Demo  (Read 3374 times)

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2353
    • Dinonykos Dungeon Craft
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #45 on: September 09, 2016, 01:23:01 PM »
I used to draw comics for fun at school, and the characters from the games (Martens, Helmettigers etc.) are based on these attempts. Actually, I see some of my DC designs as interactive comics in some way, e.g. "Rise of the Insectoids" and "The Fiend's ritual".

As mentioned above, I have just begun to (re-)do the comic telling the origin of the martens. I thought about incorporating the origin story in a DC design, but that would probably not work well. With the practice I have from the DC designs, I should now finally be able to draw a comic I am happy with.
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9916
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #46 on: September 09, 2016, 01:44:01 PM »
I certainly enjoy reading your comics and would read a full length one as well. ;D

A few years ago (which probably means five to ten years ago), who was using DC to create interactive lessons for her child(ren). No combats, lots of text. I have thought long and hard about using DC to do a "Choose Your Own Adventure" kind of thing It would be Text Statement, Guided Tour and Question List events, each with images.

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2353
    • Dinonykos Dungeon Craft
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #47 on: September 09, 2016, 01:54:41 PM »
I did not get this completely... is there something missing in the first sentence?  ???
Who did use DC for lessons?
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9916
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #48 on: September 09, 2016, 02:22:50 PM »
I did not get this completely... is there something missing in the first sentence?  ???
Who did use DC for lessons?

I should have made those different paragraphs. :) There was a member of our community who has not been active lately, who told me this. I don't recall what kind of lessons or how may, but have always tried to keep it in my brain that there are more uses for DC than just creating FRUA-style games to play.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9916
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #49 on: September 09, 2016, 02:53:58 PM »
I probably asked this already, but is there a function to automatically equip a found item? Or create NPCs which already equipped items? This might be also interesting for Hero Craft...

It turns out that we can't do this in DC right now. I was misremembering (what we can do is have NPCs join the party with spells already memorized).

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2353
    • Dinonykos Dungeon Craft
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #50 on: September 09, 2016, 03:30:39 PM »
I thought so, but thanks to another discussion we had earlier I think I can move around that problem. :)

But generally, I think it would be good if we could do this, e.g. for certain types of superheroes.
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9916
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #51 on: September 09, 2016, 03:57:19 PM »
We do have functions to see if something is readied and to ready something.

$GET_CHAR_Ready(actor, bodyLocation, itemNumber)
   Gets the name of the item readied at the given body location. Because there may be several items readied at a particular body location, you must specify which – by providing an 'itemNumber'. '0' is the first item at that location, '1' is the second, etc.
$SET_CHAR_Ready(actor, bodyPosition, itemName)
   Readies the named item at the given bodyPosition. 'itemName' may be blank to unready any item at that position.

I suppose when you give teh item to the party member you could do something then...

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2353
    • Dinonykos Dungeon Craft
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #52 on: September 09, 2016, 04:10:27 PM »
:o Wow! This sounds great! Thank you! I would have taken a much more complicated way by making the items change the characters stats and then check the stats...

I see I still do not ask the right questions sometimes...  ;)
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9916
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #53 on: September 09, 2016, 04:26:32 PM »
If you are trying to vie PCs or NPCs "super powers", there are other ways you can do it, too. But, if you specifically want the "Super Powers" to be associated with an item, that is givvven to them "already on", this is the best way (maybe the only way) to go about it.

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2353
    • Dinonykos Dungeon Craft
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #54 on: September 15, 2016, 01:34:23 PM »
I have not yet tested the $GET_CHAR_Ready(actor, bodyLocation, itemNumber) function, but I have a question - how do I specify the actor? Is it just 0, 1, 2 and so on for the party members, or something more complicated?

I am making good progress with the art for the mini games, I think I am almost ready... :)
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9916
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #55 on: September 15, 2016, 02:08:42 PM »
First, let me say this art both looks great and is highly intriguing. I can't wait to see how you're going to implement these games, not to mention playing them. :D

The numbers are index numbers, but not actors. Index numbers can only be used where the the function calls for a string. An actor will be either $CharacterContext(), $CombatantContext(), or $Myself() (amongstseveral others). I believe in this case, it will be $CharacterContext(). The way this generally works is that the engine knows who to apply it to because you are looking in that character's inventory. :) If I recall correctly, you are wanting an item that is given to a PC to immediately ready - in which case you will still use $CharacterContext(), and the engine knows who that is because it is giving the item to the selected (highlighted in the list) PC.
« Last Edit: September 15, 2016, 06:16:42 PM by manikus »

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2262
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #56 on: September 15, 2016, 06:06:38 PM »
Quote
I have not yet tested the $GET_CHAR_Ready

The 'actor' (first parameter of the function) is an internal
representation of one of the characters.  It is not a number.  It is
not a string.  It can only be generated by some very particular
GPDL functions and cannot be saved in a variable.

In order to tell you what function you should use to generate
an 'actor', I need to know where you are going to use it.
If you use it in a 'hook' then the description of the hook will
tell you what contexts are available for that hook.  'Character Context'
is almost always available if the hook is triggered by a
Special Ability attached to a character.  In this case, manikus is
correct that '$CharacterContext()' will fetch the proper actor.

But there seems to be a lot of confusion about this simple
idea of 'contexts'.  Manikus has shown some confusion occasionally.
'Context' consists of those things available for the script to
examine.  'Character Context' is not always one of those things.
'Character Context'  is not available, for example, in scripts
that run as a result of event triggers.  But there are methods
of generating a proper 'actor' from a character index.

I'll be happy to continue this discussion.  We might start by
your telling me where you expect to use the function
$Get_CHAR_Ready();
« Last Edit: September 15, 2016, 06:22:59 PM by Paul R. Stevens »

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2353
    • Dinonykos Dungeon Craft
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #57 on: September 16, 2016, 12:05:25 AM »
I want to check at a certain time if one of the characters has equipped something.

E.g.: Let's say the player wants to sneak into a castle and disguises himself as one of the castle guards by stealing a uniform. Of course, I could just check whether the item "guard uniform" is present in the party, but it would be more realistic if I could check if one of the party members actually has equipped the uniform when entering the castle. And, depending on "uniform equipped" or "not equipped", different events should follow (e.g. using a logic block event).
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2262
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #58 on: September 16, 2016, 10:14:44 AM »
I think you have asked the right question now.

Here is what I would do:

The 'Character Context' of each character is readily
available by using the function "ForEachPartyMember".
This function can be used anywhere.
see:
http://www.dianneandpaul.net/UAF/Help/SASpecialAbilitiesScripts.html

The script which you specify will be run for each party member
with 'Character Context'.  The actor parameter can be generated
by '$CharacterContext()' as Manikus said.  The result of
running 'ForEachPartyMember' can be the combined results
for all the characters in the party so that if any one of the
party members has the uniform readied then the result will
be 'TRUE'.

The script that you run for each party member can check to see
if the character is dead or alive, for example, and whether he
has the uniform.  It might, for example, increment the number
of party members wearing the uniform.

I might call the 'Global Special Ability' "CheckDisguise" and I
might call the script "IsDisguised".

The final test for a uniformed party member would look like this
$ForEachPartyMember("CheckDisguise", "IsDisguised");
and could be used in an event trigger, Logic Block, or wherever needed.

Now, as to how to check if the character is wearing the
uniform.  You can certainly use $GET_CHAR_Ready().
Or you could be more generic and give the character a
'Disguised' Special Ability when he readies any item with
a particular Special Ability by using the 'OnReady' hook.
But this is probably overkill in your situation.

« Last Edit: September 16, 2016, 03:25:05 PM by Paul R. Stevens »

Offline SilentThief

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 891
Re: Hide & Seek - Mini Games in Dungeon Craft Demo
« Reply #59 on: September 16, 2016, 05:14:12 PM »
I probably asked this already, but is there a function to automatically equip a found item? Or create NPCs which already equipped items? This might be also interesting for Hero Craft...

It turns out that we can't do this in DC right now. I was misremembering (what we can do is have NPCs join the party with spells already memorized).

---

unsure how helpful this is for what you want Dinonykos, but here goes:

Unless things have changed since I was playing around with scripts back in .914 (and I know that a lot has...) a monster/character will attempt to ready a weapon if one is not already readied in combat, but not armor as far as I recall. This was how I had set up the "boss and lackey" ideas where a weapon would be equipped at the beginning of a monsters turn in combat, and the weapon would add another copy of itself (unreadied) and then remove itself from the inventory. This allowed me to run a script in between the item swap to check if the boss was alive and if not, kill the lackeys. it was kind of hack-ish, but I could not get a monster/NPC to use any other item back then.

I have not messed with scripts lately, but I suspect there is a better way to do the "boss and lackey" idea now.

ST

 

anything