Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.
Zero Tolerance for Disrespect

quickbms string saving or string asize

Featured Replies

  • Author
  • Localization

spider91, posted Sat Jun 06, 2015 7:32 am (5583)


Hi. I've made a script for text files (.strdb) of shadow of mordor and encountered one problem - quickbms can't save strings! (or i just don't know how :mrgreen: ). There is no sizes of fields in .strdb, only offsets and then you read unicode text, but how can i save it? I've bypassed that problem like this

Code:
idstring "SKDB"
get VERSION long
get HEADER_SIZE long
get STRINGS long
get DUMMY long
get TEXT_SIZE long
get DUMMY long
set TOC_SIZE long STRINGS
math TOC_SIZE *= 8
math TOC_SIZE = HEADER_SIZE
for i = 0    get NAME_ID long
   string NAME_ID p= "0xx" NAME_ID
   string NAME_ID = ".txt"
   get OFFSET long
   math OFFSET *= 2
   math OFFSET = TOC_SIZE
   savepos POS
   goto OFFSET
   FindLoc SIZE STRING "\x00\x00\x00"
   math SIZE -= OFFSET
   math SIZE = 1
   goto POS
   log NAME_ID OFFSET SIZE
next i


but thats not very comfortable way and i need to save each string to another file, cause using memory files will loose string ID. So here we have another problem - how to save ID (long) to memory file like a text? If it's not clear here is an example of what i need.
it must be a text file with lines like this
Code:
ID1=TEXT1
ID2=TEXT2
...

So can you add string saving or string asize (to get sizes an log it like normal file) and converting hex number to string on memory file, aluigi?

Here is a .strdb file
https://mega.nz/#!Uk4C0Dab!zcjFMta5WZ8h ... 5CgrpRXyZs
  • Author
  • Localization

spider91, posted Sun Jun 07, 2015 1:52 pm (5603)


that would be really usefull. And does this includes converting of hex numbers to string in memory files?
  • Author
  • Localization

aluigi, posted Sun Jun 07, 2015 1:57 pm (5605)


What you mean exactly?
Quickbms already has tons of ways to handle and convert numbers to strings and viceversa, it depends exactly what you want to do.
You can even use String p= to use Printf and doing any operation you desire:
string NAME p "0xx.txt" NAME_ID
  • Author
  • Localization

spider91, posted Sun Jun 07, 2015 3:24 pm (5610)


I read ID as long and want to log it to memory file, but like text, cause memory file will be a .txt. Is that possible?
  • Author
  • Localization

aluigi, posted Sun Jun 07, 2015 3:45 pm (5611)


I give you a full example that shows how variables are both strings and numbers:
Code:
math VAR = 0x1234
log MEMORY_FILE 0 0
put VAR string MEMORY_FILE # the number in VAR is dumped as a string (decimal)
goto 0
get SIZE asize MEMORY_FILE
log "dump.dat" 0 SIZE MEMORY_FILE
  • Author
  • Localization

spider91, posted Sun Jun 07, 2015 6:01 pm (5613)


Thanks, i'll try that layter.

PS
Return "thanks" button, please =)
  • Author
  • Localization

aluigi, posted Mon Jun 08, 2015 4:20 pm (5619)


When the "Thanks for posts" mod will be stable, probably after phpbb 3.1.5.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.