ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Aggregation bug workaround

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Aggregation bug workaround

Postby Denk » Wed Apr 25, 2018 3:37 pm

Hi all,

I have found, that in some situations ADRIFT aggregate outputs even though I have unticked "Aggregate output, where possible" in all relevant tasks. I regard this as a bug and I am trying to find a workaround. (bugreport here: http://www.adrift.co/bug/19185 )

In the attached example I try to work around the bug by adding a line with the expression rand(0,10000). This works but has the side effect that a number is displayed which I don't want. I can then make the number "invisible" by writing the number with the background color. This can work as long as I know the background color. But since the player can change the background color, the number can become visible.

In the attach example, type TEST to test the workaround. In the task "aggregate test" change rand(0,10000) to rand(0,0) and you will see that ADRIFT aggregates outputs even though I have unticked "Aggregate output, where possible".

I am hoping that there is a tag similar to <c> which makes the output color the same as the background color even if the background color is changed by the player. Is this possible?

Or does anyone have an alternative workaround?
:Thanks:
Attachments
aggregate test.taf
(14.91 KiB) Downloaded 22 times
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 129
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 16

Re: Aggregation bug workaround

Postby saabie » Thu Apr 26, 2018 5:49 am

This does not look like aggregation, it looks like it is removing exact duplicates in the output.
Aggregation is where the task is run multiple times with different values for a reference and combines them into one sentence like "John, Lisa and You"
What do you actually want to do where this is a problem?
saabie
 
Posts: 910
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Aggregation bug workaround

Postby Denk » Thu Apr 26, 2018 6:56 am

Hi Saabie,

Thanks for clearing that up. I had a more general understanding of the word aggregation, that ADRIFT would cram everything into one sentence whenever possible. So I suppose that it is not a bug at all and I will remove my bug-report (if possible). But In my game I do not always want exact duplicates removed. What I am trying to do is a combat system where I send a group to a task, which then goes through the characters one-by-one and sometimes these tasks call other tasks which again goes through all characters. For instance there may be 3 enemies and 3 friends at a location. Each enemy attacks one random friend each round. I then have a task which checks if the attack is dodged. If it is, it simply says: Dodged!
This sentence should be given for each attack, but ADRIFT currently removes exact duplicates so "dodged!" is only written once. Thus I need a way to prevent exact duplicates being removed.
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 129
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 16

Re: Aggregation bug workaround

Postby saabie » Thu Apr 26, 2018 7:11 am

If you print something like: %character1%.Name attacks %character2%.Name
then it should work as long as the enemies have different names and they each only attack once.

I did find a way to hide your random number though:
aggregate test <# "<" & rand(0,10000) & ">" #>
will put angle brackets around the number, and nothing inside angle brackets is ever displayed.
saabie
 
Posts: 910
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Aggregation bug workaround

Postby Denk » Thu Apr 26, 2018 7:38 am

saabie wrote:I did find a way to hide your random number though:
aggregate test <# "<" & rand(0,10000) & ">" #>
will put angle brackets around the number, and nothing inside angle brackets is ever displayed.
Just what I needed! :Thanks:
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 129
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 16

Re: Aggregation bug workaround

Postby Lazzah » Thu Apr 26, 2018 10:39 am

Denk wrote:So I suppose that it is not a bug at all and I will remove my bug-report (if possible).

It is not currently possible to remove a bug report (or enhancement request), only Campbell can do that (I think). I have requested that the authors of bug reports and enhancement request should have the ability to delete them here: http://www.adrift.co/bug/18639 Vote it up!!!
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2125
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Aggregation bug workaround

Postby Campbell » Fri Apr 27, 2018 7:58 am

We could alternatively move the bug list over to here (or elsewhere), rather than having it directly on the website.
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4618
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Re: Aggregation bug workaround

Postby P/o Prune » Fri Apr 27, 2018 8:36 am

Campbell wrote:We could alternatively move the bug list over to here (or elsewhere), rather than having it directly on the website.

Looks pretty nice. Just be careful not to spread out too much.
D-Day V.5 in progress 86Kb (On backburner)
Anno 1700 Submitted to the 2018 IFComp.
User avatar
P/o Prune
Site Admin
 
Posts: 4192
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 23

Re: Aggregation bug workaround

Postby Campbell » Fri Apr 27, 2018 10:18 am

I know, I'd need to figure a way to port all the existing items across... :?
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4618
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Re: Aggregation bug workaround

Postby Lazzah » Fri Apr 27, 2018 11:49 am

Campbell wrote:I know, I'd need to figure a way to port all the existing items across... :?

Maybe you should have a cull of the existing items, there are a few of mine that can be deleted and there are quite a lot which are duplicated. There are bug reports which aren't bugs and enhancement requests that could never see the light of day.
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2125
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Aggregation bug workaround

Postby Campbell » Fri Apr 27, 2018 1:19 pm

Sounds time consuming!
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4618
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Re: Aggregation bug workaround

Postby Lazzah » Fri Apr 27, 2018 2:08 pm

Campbell wrote:Sounds time consuming!

Yes, this is why I suggested that we have access to the items so we can delete our own ones that are no longer relevant or required.
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2125
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 6 guests