Author Topic: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m [Closed, read last post!]  (Read 184930 times)

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #90 on: July 17, 2013, 06:44:22 AM »
Odd, ran here with AppLocal on my laptop -> Exrumia boss -> Boss dies -> Clear shows -> no errors/crashes. No matter which script I select/player.

Drake could be right, try to spawn a config first and retry.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #91 on: July 17, 2013, 05:17:11 PM »
I noticed that the spell card bonus never matches what I put in the script. If I put SetScore(1);  in Danmakufu the bonus will be 2 points.

I want the score to be 1,100,000 but it always end up being alot more than that.

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #92 on: July 17, 2013, 06:47:05 PM »
Missing a config.dat file. Just run config.exe and hit OK. Should be good after that.

Well don't I feel dumb. That fixed it, many, many thanks.
My name is Tres. It sounds like "Tray". Tressert is "Tray-zurt"; like Tres dessert.
I've cleared every touhou game on Lunatic, and beaten every extra except SoEW.
NMNB: MoF Hard, SA Extra, UFO Extra

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #93 on: July 17, 2013, 07:30:10 PM »
Also, how would I make an attack in which bullets come from all sides of the screen?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #94 on: July 17, 2013, 07:54:00 PM »
Also, how would I make an attack in which bullets come from all sides of the screen?
I am not sure about your previous question, but to realise this you might want to first decide how many bullets you want to spawn. Like if you have 10 bullets from each side, you need to take the maximum distance on each side. First create a loop to cycle 10x through the bullets then use GetClipMaX or Y and divide that by 10 so you get an even distributed bullet range. Spawn each bullet with the offset you calculated.

Something like (hope I am correct):
Code: [Select]
task fromAllSides {
let i = 0;
let maxbullets = 10; // var for maximum bulletd
let offsetY = GetClipMaxY/maxbullets; // this is offset for the left and right side of the field.

// ok we got our offset, time to try this out
while (i < maxbullets ) {

// we multiply i by the offset so the first bullet will spawn 0, because 0 x offset = 0. 1xoffset = ... etc
CreateShot01(GetClipMinX,i*offsetY,.........);
i++;
}
}

You code the same for the other three sides as well, but might need to calculate the top/bottom separate. If you increase the bullet count, it will divide it equally again along the sides because of our handy offsetY/maxbullets variable.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #95 on: July 17, 2013, 10:21:12 PM »
Thanks it works, though I can't get it to spawn from the right and bottom, but it doesn't matter for what I'm doing.


That's 3 cards down and I guess I'll do two more and upload them here.

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #96 on: July 19, 2013, 06:29:55 AM »
Code: [Select]
task fromAllSides {
let i = 0;
let maxbullets = 10; // var for maximum bulletd
let offsetY = GetClipMaxY/maxbullets; // this is offset for the left and right side of the field.

// ok we got our offset, time to try this out
while (i <[b]=[/b] maxbullets ) {

// we multiply i by the offset so the first bullet will spawn 0, because 0 x offset = 0. 1xoffset = ... etc
CreateShot01(GetClipMinX,i*offsetY,.........);
i++;
}
}
I'm guessing, adding the extra "=" will help solve the bottom right problem.
Currently a normal player

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #97 on: July 19, 2013, 10:17:42 AM »
I'm guessing, adding the extra "=" will help solve the bottom right problem.
I read his post more like as "I cannot manage to spawn it from the floor and right wall". Though you are correct, the <= is required in there.

Also, I intentionally left out the information for spawning the other sides of the player field, so people do not rely too much on copy/pasting (unless they already written the code and it is wrong). Basically with the example I gave, one can easily adapt it to all sides of the field.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #98 on: July 19, 2013, 07:09:13 PM »
Thanks guys. I have a two more questions.

1: Do spell card backgrounds reduce the quality of the graphics? I noticed my boss as well as any graphical art loaded looks really bad but non spells look fine.

2: I'm having trouble getting Events to show the pictures. I loaded them and all of the directories are correct as well as everything else but still nothing.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #99 on: July 19, 2013, 07:19:55 PM »
Thanks guys. I have a two more questions.

1: Do spell card backgrounds reduce the quality of the graphics? I noticed my boss as well as any graphical art loaded looks really bad but non spells look fine.

2: I'm having trouble getting Events to show the pictures. I loaded them and all of the directories are correct as well as everything else but still nothing.

1) If you change the scale/alpha, etc. then it will change the image quality. Using pure black (0,0,0) in an image will cause that to be rendered as transparent.
2) Did you use SetChar? Example below.
Code: [Select]
@MainLoop{
  SetStep(0);
  SetChar(LEFT, veemon);
  SetGraphicRect(LEFT, 90, 75, 360, 360);
  SetChar(RIGHT, eevee);
  SetGraphicRect(RIGHT, 0, 0, 195, 242);
  MoveChar(LEFT, FRONT);
//etc.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #100 on: July 19, 2013, 07:33:38 PM »
1) If you change the scale/alpha, etc. then it will change the image quality. Using pure black (0,0,0) in an image will cause that to be rendered as transparent.
2) Did you use SetChar? Example below.

1:I found out that drawing text on the screen causes everything to look bad (except bullets). I removed the text and it looks better now.

2: Yeah I'm using the example code from the wiki


Code: [Select]
    @MainLoop{
     SetChar(LEFT, "Reimu1");                 //Set the player's character on the left side, with the graphic you've told it to display.
    SetGraphicRect(LEFT, 0, 0, 256, 320);           //The region you're displaying of the graphic for the player character, just like SetGraphicRect.
    MoveChar(LEFT, BACK);                             //Move the player's character into the background, to show she is not speaking.
    SetChar(RIGHT, "Koishi1");                //Set the boss' picture on the right side of the screen.
    SetGraphicRect(RIGHT, 2, 5, 256, 320);           //Set the boundry of the picture you want displayed.
    MoveChar(RIGHT, FRONT);                          //Move the boss' image to the front to show that she is speaking.
    TextOutA("text");           //Self explanatory. Danmakufu will not pass this function until a certain amount of time has passed, or the player clicks the shot button.
    MoveChar(RIGHT, BACK);                           //Move the boss to the background, then...
    MoveChar(LEFT, FRONT);                           //Move the player forward, to show that she will now speak.
    TextOutA("text");
    TextOutA("text");                      //What the player will be speaking.
    End;           //This ends the event.
    }
     
     @Finalize{
     // [delete all your graphics here]
     }
    }

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #101 on: July 19, 2013, 08:25:29 PM »
Are you sure you got the file extensions and filepath correct? If the event script is in a subdirectory, then you might need to use .\..\

The Noodles Guy

  • Flip the screen
  • What if Seija met a guy with bipolar disease?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #102 on: July 19, 2013, 08:39:58 PM »
1. 0,0,0 (AKA pure black) will show that parts to be transparent so you should use 1,1,1.

2. You could post your entire code (from 'script_event bleh' to @Finalize) so we can see what's wrong.
Easy Modo? That's for kids, and for me.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #103 on: July 19, 2013, 08:49:38 PM »
Here's the full script.

http://pastebin.com/KH4B3PAN

The Noodles Guy

  • Flip the screen
  • What if Seija met a guy with bipolar disease?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #104 on: July 19, 2013, 08:55:39 PM »
The whole "Reimu1" (basically all the "let blehblehbleh = csd = blehlehbleh.png" thing) goes on "script_event name", not in Initialize.

Also you could put "let CSD = GetCurrentScriptDirectory;" on "script_event name". It works for me.
Easy Modo? That's for kids, and for me.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #105 on: July 19, 2013, 09:14:41 PM »
Code: [Select]
     // [Load all your graphics and foolishness here]
     let Reimu1 = GetCurrentScriptDirectory~"Reimu Pic1.png";
     let Koishi1 = "\script\Koishi\Koishi Pic1.png;";
     let Reimu2 = ".\Reimu Pic2.png";
     let Koishi2 = ".\Koishi Pic2.png;";

Please read Helepolis's Understanding Paths and Directories Tutorial.
http://www.shrinemaiden.org/forum/index.php/topic,4752.0.html

Your filepaths should use GetCurrentScriptDirectory for Koishi 1, Reimu2, etc.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #106 on: July 19, 2013, 09:27:15 PM »
Alright I moved and changed everything to Get CurrentScriptDirectory but still they won't show up.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #107 on: July 19, 2013, 09:29:24 PM »
1:I found out that drawing text on the screen causes everything to look bad (except bullets). I removed the text and it looks better now.
This is what I noticed as well in some of my games, is it due to DrawText? I need to check that then because some of my cards are also suffering from this. Looks pretty ugly indeed.

Alright I moved and changed everything to Get CurrentScriptDirectory but still they won't show up.
Post latest code please. I sense you're still missing something.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #109 on: July 19, 2013, 09:39:02 PM »
http://pastebin.com/4WpfY1vj
Ok where are your images located for the event. Inside scripts folder? Or your own personal folder i.e:  scriptsInfinitewave 


The Noodles Guy

  • Flip the screen
  • What if Seija met a guy with bipolar disease?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #110 on: July 19, 2013, 09:41:10 PM »
Here's your edit.

pastebin blehblehbleh

At least i tried.
« Last Edit: July 19, 2013, 09:42:46 PM by Yamamoto »
Easy Modo? That's for kids, and for me.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #111 on: July 19, 2013, 09:43:22 PM »
Here's your edit.

pastebin blehblehbleh

let CSD = GetCurrentScriptDirectory; plz
I am sorry to say Yamamoto. What you're doing is redundant. you're creating a variable called CSD and storing inside it GetCurrentScriptDirectory. However, you never use CSD. So there is no use in declaring a variable called CSD if you're not going to use it. Proper way should be:
Code: [Select]
let CSD = GetCurrentScriptDirectory;
let Reimu1 = CSD ~ "Reimu Pic1.png";
let Koishi1 = CSD ~ "Koishi Pic1.png";
let Reimu2 = CSD ~ "Reimu Pic2.png";
let Koishi2 = CSD ~ "Koishi Pic2.png";
However this is not Infinite's problem I am sensing. Awaiting the reply on folder structure from him/her.

Edit
I found your possible error (unsure). Remove spaces from the file names.  "Reimu Pic1.png"; -> turn it into  "ReimuPic1.png"; Did a quick test with my own boss by adding space in the code and in the file name. Danmakufu doesn't likes this for some reason. Logically, don't forget to rename your actual files as well.
« Last Edit: July 19, 2013, 09:48:56 PM by Helepolis »

The Noodles Guy

  • Flip the screen
  • What if Seija met a guy with bipolar disease?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #112 on: July 19, 2013, 09:47:55 PM »
At least I tried to do something  :V
Easy Modo? That's for kids, and for me.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #113 on: July 19, 2013, 09:49:35 PM »
At least I tried to do something  :V
And by that, we keep on learning :)

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #114 on: July 19, 2013, 09:53:57 PM »
Ok where are your images located for the event. Inside scripts folder? Or your own personal folder i.e:  scripts\Infinitewave\

"script\Koishi\" that's where everything is stored, graphics, music, and sound effects. I cram everything into the script folder for the sake of having everything together.

I also tried renaming the files without using spaces, that didn't work either.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #115 on: July 19, 2013, 10:07:55 PM »
"script\Koishi\" that's where everything is stored, graphics, music, and sound effects. I cram everything into the script folder for the sake of having everything together.

I also tried renaming the files without using spaces, that didn't work either.
Assuming your txt files are also inside Koishi, the code should be correct. Cannot see what is going wrong here. I am currently also scratching my head in confusion.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #116 on: July 19, 2013, 10:20:31 PM »
Assuming your txt files are also inside Koishi, the code should be correct. Cannot see what is going wrong here. I am currently also scratching my head in confusion.

I can give you the game itself. I uploaded it earlier today. But sadly I'm on mobile data and ran out of 4g for the month. It would be too slow to upload with the changes I just applied. Since then.

http://www.mediafire.com/download/fuf11sgu52pr545/Koishi's_Fun_Time_fixed.7z
   
I was planning on making a thread about it so I can get some feedback on it.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #117 on: July 20, 2013, 07:33:30 AM »
I can give you the game itself. I uploaded it earlier today. But sadly I'm on mobile data and ran out of 4g for the month. It would be too slow to upload with the changes I just applied. Since then.

http://www.mediafire.com/download/fuf11sgu52pr545/Koishi's_Fun_Time_fixed.7z
   
I was planning on making a thread about it so I can get some feedback on it.
Thanks, let me look into this because I am really confused about it all.

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #118 on: July 20, 2013, 09:09:13 AM »
Oh hi.

I fixed your "Stage Koi.txt" for you.

And now I disappear again.

EDIT: I should probably explain what the problems were:
1.) You should use GetCurrentScriptDirectory whenever possible. Using a period to indicate current directory is buggy for some reason.
2.) You were putting a string rather than the variable for the SetChar function.
3.) When I changed it to the variable, it wasn't found because you were declaring them in @Intialize, making them scoped only for @Initialize. Moving them out of the any of the blocks fixed that.
4.) There was a semicolon after .png for Koishi1.
« Last Edit: July 20, 2013, 09:17:00 AM by Blargel »
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #119 on: July 20, 2013, 02:27:33 PM »
Oh hi.

I fixed your "Stage Koi.txt" for you.

And now I disappear again.

EDIT: I should probably explain what the problems were:
1.) You should use GetCurrentScriptDirectory whenever possible. Using a period to indicate current directory is buggy for some reason.
2.) You were putting a string rather than the variable for the SetChar function.
3.) When I changed it to the variable, it wasn't found because you were declaring them in @Intialize, making them scoped only for @Initialize. Moving them out of the any of the blocks fixed that.
4.) There was a semicolon after .png for Koishi1.

I knew it was going to be something derpy. Thanks Blargel.