RPGM Completed Complete [RJ155863] - Sarah of the Rotation Cut v2.2.1 - Translation v2.3.5

5.00 star(s) 1 Vote

kR1pt0n1t3

Active Member
Dec 31, 2017
821
977
I asked about coding because I've been wanting to make a proper diary for the relationship tab. And I'm not asking you to make it for me, I'm just curious about what the best approach to this would be and how hard it is to make something like that.

When I made this window, I basically copied an already existing script and just edited a lot of stuff. It's working but I'm not even sure it's properly coded.

For a long time I wanted to add pages system or scrolling so I can fit more text. I want at the end of the text part to write what page you're on and how many of them there are and by using 2 keys to go either left or right. Obviously arrow keys are used for changing characters.

It's far to complicated for my coding knowledge.


1670618264282.png

You don't have permission to view the spoiler content. Log in or register now.

And thanks for reporting all these bugs, I really appreciate it.
 
Last edited:
  • Like
Reactions: tmp12

tmp12

Newbie
Jun 1, 2017
28
10
You made me do it (take video, trim it and convert to gif) xD:
panties-bug.gif
I think tomorrow about script. I have some ideas but it will take some time to try it out (and learn one or two things from other scripts). I think hardest thing is how to split ling text on pages if we do it manually there should be no problems but if not...
 
Last edited:
  • Haha
Reactions: Frrz

kR1pt0n1t3

Active Member
Dec 31, 2017
821
977
Ah, that never happened in my game... wtf.

EDIT:
Okay, found out what's wrong. It was a problem in the script. Just added a few more conditional loops in a few places and now it's working as it should.
It happened to me as well, just need to play the event longer.
 
Last edited:

tmp12

Newbie
Jun 1, 2017
28
10
At first i was thinking about something like this:
Code:
dudes = [
  {
    :name => "Test",
    :variable_id => 50,
    :stages => {
      10 => ['single page text'],
      20 => ['first page text', 'second page text']
    }
  }
].each_with_object([]) do |dude, arr|
  arr << dude # if $game_variables[dude.variable_id] >= dude.stages.keys[0]
end
But you building text based on many variables so splitting it on pages manually would be very hard. But you splitting text on lines (half manually) and draw it line by line with certain offset so we could count how much lines we can draw on single page and then use it to split text on pages. Something like this:
Code:
pages = (lines.length / LIMIT).ceil
if page < 1
  page = pages
elsif page > pages
  page = 1
end
page_lines = lines.slice((page - 1) * LIMIT, LIMIT)
What your like more single window scene with more controls (for example changing pages with q/w) or multi window scene like shops or debug window?
PS: The guy who decided use skills window for this purpose is insane.
 
Last edited:

kR1pt0n1t3

Active Member
Dec 31, 2017
821
977
Just make it however you think is good just as long as it works and then I'll write text again or whatever to adapt to the new system.
 

tmp12

Newbie
Jun 1, 2017
28
10
Not best but works (for test reason limit is 5 lines per page). Better would be add new window for person info than adding it to window with text.
Ps: use enter and then arrows to switch pages. I wanted to do it differently but q/w keys are handled by characters list so i cannot use them without deactivating list window. It can be done with removing two if's from update method of Window_Selectable class but i don't like this solution either.
 
Last edited:
  • Like
Reactions: kR1pt0n1t3

tmp12

Newbie
Jun 1, 2017
28
10
About you question: this scripts are original game scripts with little changes (both mine and yours). If i was doing this from scratch i think that i've done it differently: create global array with persons data (so it can be used in other scripts as well) instead of game skills and convert it to hash with only known persons based on switch values.
Code:
$persons = [
# Someone
{
:id => 1,
:switch_id => 1,
:description => '',
:variable_ids => { :progress => 2, :sex => 4, :creampie => 8, :anal => 16 }
},
#...
]
#...
class Window_DiaryList < Window_Selectable
#...
def refresh
#...
@data = $persons.each_with_object({}) do |p, h|
if $game_switches[p.switch_id] == true
ids = p.variable_ids
h[p.id] = {
:name => $game_actors[p.id].name,
:description => p.description,
:progress => $game_variables[ids[:progress]],
:sex => $game_variables[ids[:sex]],
:creampie => $game_variables[ids[:creampie]],
:anal => $game_variables[ids[:anal]]
}
end
end
#...
end
#...
end
This will make script portable to games with usable skills. Also this way we can easily pass calculated relationship data between different windows. The text building are complex and probably better keep as is.
PS: Your problem not much about coding skills, but about understanding how this engine works. I recommend you create empty game with english version of rpg maker xp and read it's scripts. There will be english comments to help you understand whats going on.
 
Last edited:
  • Like
Reactions: kR1pt0n1t3

kR1pt0n1t3

Active Member
Dec 31, 2017
821
977
Wow, can't wait to try it out when I get home from work.

I'm so thrilled to try this out! Thanks a ton, man!

So how do I add back the actor window? I tried something like this while going through your files but I'm missing something.
I lowered the "super(0, 64, 640, 320-64)" of the DiaryText script for this actor window to fit.
You don't have permission to view the spoiler content. Log in or register now.

You don't have permission to view the spoiler content. Log in or register now.
 
Last edited:

kR1pt0n1t3

Active Member
Dec 31, 2017
821
977
Thanks, I've tried to make it work with what you posted before but I kept getting no method errors.

Does your script include the text wrap? Or do I still need to manually break the lines?

And what do I change to let's say increase the size of lines that can fit on one page? Nvm, I somehow missed that PAGE_limit at the begging of the script.

It works just beautifully, just how I imagined it but sadly couldn't code it myself.

Perfection, bro! If I could kiss you I would, no gay.


1670917880265.png
 
Last edited:

tmp12

Newbie
Jun 1, 2017
28
10
Word wrapping will cause manually splitted lines to overlap each other. So i didn't even try to implement it. I see you trying to align names:
Screenshot 2022-12-13 112622.png
Code:
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    person = @data[index]
    self.contents.font.color = normal_color
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(x + 4, y, 280, 32, person.name, 1)
  end
 
Last edited:
  • Like
Reactions: kR1pt0n1t3

kR1pt0n1t3

Active Member
Dec 31, 2017
821
977
Yeah, I did that already. I just changed from 0 to 1.
Also, lowered the text font size a bit for more stuff to fit inside and changed the windows size of the text and info windows. And of course, increased the line limit to 6.

You don't know how much this bothered me.

EDIT: Ah, now I see it wasn't centered properly. Changing to 1 wasn't enough.
 
Last edited:

tmp12

Newbie
Jun 1, 2017
28
10
Changing align to 1 is enough if full width are used but that's wasn't the case. So i adjusted code to use full width of column - 8.
Forgot to add
Code:
    # Prepare for transition
    Graphics.freeze
before
Code:
    # Dispose windows
    @list_window.dispose
    @info_window.dispose
    @text_window.dispose
    @pager_window.dispose
It works without it but there must be a reason all standard scenes doing so.

Edit: got idea how to implement text wrapping so will try to code it later.
 
Last edited:

kR1pt0n1t3

Active Member
Dec 31, 2017
821
977
Word wrap would be amazing. As it is now I always increment a variable to add a new text line, but I plan to implement events that players can trigger in whatever order the player wants. It would be a real hassle to manually fit all the text.
 

jamadhur

New Member
Mar 23, 2020
4
1
So I havent been here for years, I think 2 years ago was the last time I played this game, any advice what should I do? I wanna start new game and I feel like you guys doing superb work by fixing bugs
 

tmp12

Newbie
Jun 1, 2017
28
10
Sorry i didn't have save right after farmer (my save far above this event).

Farmer will got injured after Aramis beat up Mierupa in Sarah house (play all Aramis events in military academy) and Sarah had sex with farmer on ranch. To play Aramis events you must talk with him in military academy and go to room above by stairs. To have sex with farmer she must buy red panties in shop next to her house (this could be done after 2nd farmer scene at north watchtower).
 

kR1pt0n1t3

Active Member
Dec 31, 2017
821
977
You don't get soft-locked on the farmer. You always miss doing something and that's why he never appears.
Why would you play the game six times over and over instead of posting your last save file and ask for help?
 
5.00 star(s) 1 Vote