Author Topic: Special Gaphics DEMO  (Read 186 times)

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Special Gaphics DEMO
« on: July 11, 2017, 06:00:26 PM »
Special Graphics are a bold new feature for use in Dungeon Craft 3.02 engine and higher. They allow designers to add images, on the top-most layer, to the 3D screen of their games.

I've attached a small demo module that shows just a couiple of examples: a graphical compass, a special message to player, and special occassion suppression of the compass.

Do the very short playfile presentation and then ope it up in your editor and poke around. The scripts for the special graphics are in an SA called "SpecialGraphics.

DEMO:
http://manikus.reonis.com/files/Special_Graphics_DEMO.7z
Help documentation for Special Graphics:
http://www.dianneandpaul.net/UAF/Help/SASpecialGraphic.html

Everything you need to see the demo is included in the archive, including engine 3.02 and Resource files.

Offline SilentThief

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 891
Re: Special Gaphics DEMO
« Reply #1 on: July 11, 2017, 07:28:18 PM »
grabbing this now (at work, will test when I get home) will test n comment after trying this out

but, this sounds awesome

ST

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Special Gaphics DEMO
« Reply #2 on: July 12, 2017, 12:57:35 PM »
From teh next release forward, I am going to be adding the compass to the default release. ;)

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2339
    • Dinonykos Dungeon Craft
Re: Special Gaphics DEMO
« Reply #3 on: July 12, 2017, 01:47:43 PM »
I just tested it, quite impressive!  :)
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: 9837
Re: Special Gaphics DEMO
« Reply #4 on: July 12, 2017, 02:06:43 PM »
98% of the credit goes to Paul. :D

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2178
    • Nol Drek's Web Site
Re: Special Gaphics DEMO
« Reply #5 on: September 30, 2017, 05:50:27 PM »
I like the special graphics SA, I have always wanted a compass rose to be displayed during exploration.

A couple of bugs I have noticed:

1) If a text event displays a big pic, then the border_Compass graphic gets drawn on top of the big pic. I'd like the compass graphic to be hidden when there is a big pic being displayed.
2) During other events, such as a Question List, the compass_Graphic disappears. I'd like the compass graphic to be displayed during events other than text statement events.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Special Gaphics DEMO
« Reply #6 on: September 30, 2017, 06:02:37 PM »
I like the special graphics SA, I have always wanted a compass rose to be displayed during exploration.

A couple of bugs I have noticed:

1) If a text event displays a big pic, then the border_Compass graphic gets drawn on top of the big pic. I'd like the compass graphic to be hidden when there is a big pic being displayed.
2) During other events, such as a Question List, the compass_Graphic disappears. I'd like the compass graphic to be displayed during events other than text statement events.

Neither one of these are bugs. :D
#1 - You need to script an exception. How? Give the event with the bigpic an Event Attribute. Then, the compass script needs to have a clause which states it will not show during events with the EA.
#2 - Not a bug, just not added to support of Special Graphics. Paul has stated that we need to tell which events we want to have the Special Graphics work in, which we ar ecalling circumstances. Here is the link to make requests:
http://ua.reonis.com/index.php?topic=3577.0

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2178
    • Nol Drek's Web Site
Re: Special Gaphics DEMO
« Reply #7 on: September 30, 2017, 06:32:39 PM »
#1 - You need to script an exception. How? Give the event with the bigpic an Event Attribute. Then, the compass script needs to have a clause which states it will not show during events with the EA.

Every event that displays a bigpic needs to have an Event Attribute? What about when I am exploring an overland map? The compass appears on top of the overland map even when there is no event at the current location. On an overland map, the compass spins clockwise/counterclockwise with every step the party takes to the east/west using the arrow keys.

#2 - Not a bug, just not added to support of Special Graphics. Paul has stated that we need to tell which events we want to have the Special Graphics work in, which we ar ecalling circumstances. Here is the link to make requests:
http://ua.reonis.com/index.php?topic=3577.0

I want the compass to appear in EVERY event. ALL of them. Except when the event is displaying a big pic, and never on overland maps. I'll go make the request now.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Special Gaphics DEMO
« Reply #8 on: September 30, 2017, 06:39:53 PM »
#1 - You need to script an exception. How? Give the event with the bigpic an Event Attribute. Then, the compass script needs to have a clause which states it will not show during events with the EA.

Every event that displays a bigpic needs to have an Event Attribute? What about when I am exploring an overland map? The compass appears on top of the overland map even when there is no event at the current location. On an overland map, the compass spins clockwise/counterclockwise with every step the party takes to the east/west using the arrow keys.

#2 - Not a bug, just not added to support of Special Graphics. Paul has stated that we need to tell which events we want to have the Special Graphics work in, which we ar ecalling circumstances. Here is the link to make requests:
http://ua.reonis.com/index.php?topic=3577.0

I want the compass to appear in EVERY event. ALL of them. Except when the event is displaying a big pic, and never on overland maps. I'll go make the request now.

Under the current method, you would need to add a line to the script that says something like "if level = #, don't display) and # would be the number of the overland level.

I know this seems a bit of work for a compass, but this is not a compass event.  Perhaps when Paul looks at your request, he will come up with something.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2178
    • Nol Drek's Web Site
Re: Special Gaphics DEMO
« Reply #9 on: September 30, 2017, 07:58:56 PM »
Thanks for all the help Manikus!

I added two lines to the SpecialGraphics SA, and was able to suppress the display of a compass rose on levels 3 and 5 of my design, which are overland maps.

Code: [Select]
$IF ($GET_EVENT_Attribute(0,"NoCompass") != "-?-?-") {$RETURN;};
$IF ($MIDDLE($GET_PARTY_LOCATION(), 1, 1) == "3") {$RETURN;};
$IF ($MIDDLE($GET_PARTY_LOCATION(), 1, 1) == "5") {$RETURN;};
$IF ($GET_PARTY_FACING() ==# 0)
{
$SET_HOOK_PARAM( 3, "border_Compass.png" );
$SET_HOOK_PARAM( 4, 272 );
$SET_HOOK_PARAM( 5, 263 );
$SET_HOOK_PARAM( 6, 0 );
$SET_HOOK_PARAM( 7, 0 );
$SET_HOOK_PARAM( 8, 78 );
$SET_HOOK_PARAM( 9, 46 );
};
$IF ($GET_PARTY_FACING() ==# 1)
{
$SET_HOOK_PARAM( 3, "border_Compass.png" );
$SET_HOOK_PARAM( 4, 272 );
$SET_HOOK_PARAM( 5, 263 );
$SET_HOOK_PARAM( 6, 78 );
$SET_HOOK_PARAM( 7, 0 );
$SET_HOOK_PARAM( 8, 78 );
$SET_HOOK_PARAM( 9, 46 );
};
$IF ($GET_PARTY_FACING() ==# 2)
{
$SET_HOOK_PARAM( 3, "border_Compass.png" );
$SET_HOOK_PARAM( 4, 272 );
$SET_HOOK_PARAM( 5, 263 );
$SET_HOOK_PARAM( 6, 156 );
$SET_HOOK_PARAM( 7, 0 );
$SET_HOOK_PARAM( 8, 78 );
$SET_HOOK_PARAM( 9, 46 );
};
$IF ($GET_PARTY_FACING() ==# 3)
{
$SET_HOOK_PARAM( 3, "border_Compass.png" );
$SET_HOOK_PARAM( 4, 272 );
$SET_HOOK_PARAM( 5, 263 );
$SET_HOOK_PARAM( 6, 234 );
$SET_HOOK_PARAM( 7, 0 );
$SET_HOOK_PARAM( 8, 78 );
$SET_HOOK_PARAM( 9, 46 );
};

I tried using the two lines below, but they didn't work as expected. Does $GET_GAME_CURRLEVEL() return the level number starting from zero, or does it return the level index starting from one? Or does it return something else?

$IF ($GET_GAME_CURRLEVEL() ==# 3) {$RETURN;};
$IF ($GET_GAME_CURRLEVEL() ==# 5) {$RETURN;};

At any rate, I was able to use the $MIDDLE() function to get the level as a substring of the party's location and it worked great.

$IF ($MIDDLE($GET_PARTY_LOCATION(), 1, 1) == "3") {$RETURN;};
$IF ($MIDDLE($GET_PARTY_LOCATION(), 1, 1) == "5") {$RETURN;};

I was also able to add the Event Attribute "NoCompass" with a value of 1 to all the text events that display a big pic and it worked like a charm. I only had two big pic text events, so it was easy to do.

Everything is working great now, except the compass rose disappears during a Special Item, Gain Experience, or Question List event.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2235
Re: Special Gaphics DEMO
« Reply #10 on: September 30, 2017, 10:26:44 PM »
Your $Middle won't work if levels with 2 digits exist.

Get_game_currlevel should return 1 -> n.  I think it is broken
and returns 0 -> n-1.  It will be fixed in version 3.27.

Offline Milos Gulan

  • Hero Member
  • *****
  • Posts: 3154
Re: Special Gaphics DEMO
« Reply #11 on: October 01, 2017, 04:38:45 AM »
Thank You, it looks good. A bit complicated for me :) but campass works in my mod too :D

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9837
Re: Special Gaphics DEMO
« Reply #12 on: October 02, 2017, 01:02:52 PM »
I am glad that worked for you, Nol. If you hadn't gotten it worked out, I would have done something about it today. I was failry sure I had given you enough of a push in the right direction. ;)

Thank you, Paul. You were able to ascertain and resolve this before I could even get the Help docs open.