• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Nekiro's Rcc Editor

Nekiro

Legendary OT User
TFS Developer
Joined
Sep 7, 2015
Messages
2,677
Solutions
127
Reaction score
2,112
Hi, we didn't have one so now we do.

Nekiro open source Limited proudly presents Nekiro's Rcc Editor, brought to you by the one and only Nekiro.

1641662928137.png

Features:
  • extract assets
  • load rcc files
  • compile rcc files
  • replace assets

Repository: GitHub - nekiro/Nekiro-Rcc-Editor (https://github.com/nekiro/Nekiro-s-Rcc-Editor)
Release: Releases · nekiro/Nekiro-Rcc-Editor (https://github.com/nekiro/Nekiro-Rcc-Editor/releases)

I spent some time on writting that (specifically front end, gosh I hate front end!), so consider following link:
 
Last edited:
i have no idea what rcc is cuz i dont play the new tibia but gj i guess
 
Great work Nekiro, thanks for share this useful tool !
I believe in these great talents that one day we will be able to have an RME using assets.
 
Last edited:
Great work Nekiro, thanks for share this useful tool !
I believe in these great talents that one day we will be able to have an RME using assets.
Actually this shouldn't be that far away. I started working on otc support (mehah otc has support for 12.81, look prs) now I'm working on making OTC load appearances directly. If I release that then RME is matter of time.
 
reader.js:7
Why bluebird? fs-extra docs say „All fs methods return promises if the callback isn't passed.”.

reader.js:12
Just use ternary, also I’m not sure if we need a function here? Can this app.isPackaged value change during runtime?

reader.js:28
Use Promise.all to make it faster. You could also consider using one .reduce instead of two .map and this .reduce would return an object like { files: […], folders: […] }.

reader.js:34,99,102,108,132
Unnecessary template literal.

reader.js:41
In all these places where you want to join multiple parts of path you can use path.join that will handle some things like slashes for you.

reader.js:42
Empty catch, that’s interesting. Why?

reader.js:57
To make it a little bit shorter you can also write isImage: [".png", ".jpg"].includes(ext),. And it would be a good practice to extract this array to a constant, maybe even in a separate file with constants. And the same applies to other const strings, like errors or messages.

reader.js:75
To make it a little bit shorter you can also write if (!images.length).

reader.js:82,114
Promise.all again.

reader.js:97
Instead of this line you can probably use default parameter (async (filePath = loadedFilePath) => {).

reader.js:153
Short syntax for returning?

mainRenderer.js:17
This line looks ugly, maybe there’s a better way to handle passing and retrieving this id?

mainRenderer.js:44
Why not for … of here again? If you need indexes you can write for (const [index, image] of images.entries()) or use images.forEach.

mainRenderer.js:51,68
I’m almost sure you can use const here. It’s because js will only check references, so if you assign different value to a const variable it won’t allow you to do that because it would be different reference, but if you only change some properties of the object without changing it, it will work. It’s also possible to create a const array and modify its elements. So images variable in reader.js:10 could also be const.

mainRendererer.js:52
Unnecessary template literal.


By the way, why not TypeScript?
 
reader.js:7
Why bluebird? fs-extra docs say „All fs methods return promises if the callback isn't passed.”.

reader.js:12
Just use ternary, also I’m not sure if we need a function here? Can this app.isPackaged value change during runtime?

reader.js:28
Use Promise.all to make it faster. You could also consider using one .reduce instead of two .map and this .reduce would return an object like { files: […], folders: […] }.

reader.js:34,99,102,108,132
Unnecessary template literal.

reader.js:41
In all these places where you want to join multiple parts of path you can use path.join that will handle some things like slashes for you.

reader.js:42
Empty catch, that’s interesting. Why?

reader.js:57
To make it a little bit shorter you can also write isImage: [".png", ".jpg"].includes(ext),. And it would be a good practice to extract this array to a constant, maybe even in a separate file with constants. And the same applies to other const strings, like errors or messages.

reader.js:75
To make it a little bit shorter you can also write if (!images.length).

reader.js:82,114
Promise.all again.

reader.js:97
Instead of this line you can probably use default parameter (async (filePath = loadedFilePath) => {).

reader.js:153
Short syntax for returning?

mainRenderer.js:17
This line looks ugly, maybe there’s a better way to handle passing and retrieving this id?

mainRenderer.js:44
Why not for … of here again? If you need indexes you can write for (const [index, image] of images.entries()) or use images.forEach.

mainRenderer.js:51,68
I’m almost sure you can use const here. It’s because js will only check references, so if you assign different value to a const variable it won’t allow you to do that because it would be different reference, but if you only change some properties of the object without changing it, it will work. It’s also possible to create a const array and modify its elements. So images variable in reader.js:10 could also be const.

mainRendererer.js:52
Unnecessary template literal.


By the way, why not TypeScript?
This is great stuff, but can you submit a pull request with these changes or submit an issue on github with enhancements? Would be a better place for that.
I'm learning node so this is helpful. I don' want to clutter this thread, so conversation on github would be ideal.

I dont use typescript, because I dont really like it
 
Last edited:
There's no point of using typescript if you're going to be declaring everything as any.
I agree, I used "any" as a kind of hack to port js code into ts without changing everything. I'm going to fix this later or if you wish you can help me out with that via pull request or create issue with suggestions. Would be very helpful
 
There's no point of using typescript if you're going to be declaring everything as any.
I disagree, I'd still use it just for import, it looks so much cooler than require.

I used "any" as a kind of hack to port js code into ts without changing everything
TS is a superset of JS, any valid JS code is also a valid TS code so it should work without any changes.
 
I disagree, I'd still use it just for import, it looks so much cooler than require.


TS is a superset of JS, any valid JS code is also a valid TS code so it should work without any changes.
Well yes, but no. My tsconfig won't let me compile without setting things to any.
 
Don't use any

yeah 100% hack
I will not not use this

There's no point of using typescript if you're going to be declaring everything as any.

No software would ever exist if people would listen to you and this bullshit. He used any, oh no, oh fuck the compiler will cry and leave you for Haskell. What a tragedy. Better never touch anything Nekiro never did, it may explode (?).

Using any allows you to gradually introduce typing into a JS codebase. This is literally a selling point for TypeScript. It does not defeat its purpose. Have you all ever developed software or are you parroting stuff some guy on Discord told you once?

No wonder people don't release shit in this community, you do and all you get is some advanced beginners derailing the thread with their infinitey enlightening wisdom. Wtf?

Congrats on the release...
 
Back
Top