Author Topic: Please write 10-20 lines about WeiDU's general architecture and main algorithms  (Read 2211 times)

Offline AL|EN

  • Planewalker
  • *****
  • Posts: 391
  • Gender: Male
Hi,


Please write 10-20 lines about WeiDU's general architecture and main algorithms. Such things as:
- general flow of the main loop
- elkhound part (what's for, can be replaced?)
- backup system new logic
- components/groups etc
- other related things


If you could also include a reference to the places inside code, that would be wonderful.

Project Infinity public BETA - mod manager for Infinity Engine games
Modder's Guide to Github - you cannot have progress without committing changes

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
- general flow of the main loop
I'm sorry, but there is no 10-20 lines about it. When you say "main loop", I assume you mean installing a mod?

Quote
- elkhound part (what's for, can be replaced?)
A short description can be found in the project's readme. For a slightly longer description, there's a link to McPeak's old web page. It's still informative, though some of the comparisons are outdated.

Quote
- backup system new logic
What are you referring to?

Quote
- components/groups etc
I'm going to have to refer to the readme. If there is something you are missing, you'll need to be more specific.

Quote
- other related things
If it's not in the readme, I'm going to have to ask you to be more specific.

Offline AL|EN

  • Planewalker
  • *****
  • Posts: 391
  • Gender: Male
Indeed I should be more specific. My questions are code-structure related. I'm not expecting that you will explain every line of the code but I'm sure that you can point to correct pieces of the code itself and the relations between those pieces.

- general flow of the main loop
I'm sorry, but there is no 10-20 lines about it. When you say "main loop", I assume you mean installing a mod?
Yes, from the start like reading file, parsing instructions, extracting game data, creating backup, modify it and writing weidu log. Things specific to the modification of the IE games data, like for eg: how a function is changing binary data in order to change item name, are not so important.
Quote
- backup system new logic
What are you referring to?
Recent weidu version improved the way how backup system works, please describe how it works.
Quote
- elkhound part (what's for, can be replaced?)
A short description can be found in the project's readme. For a slightly longer description, there's a link to McPeak's old web page. It's still informative, though some of the comparisons are outdated.
Ok, so it's GLR parser. Now, I assume that it's used to match tp2 keywords and their aliases. But how and where it is used for weidu?
« Last Edit: June 04, 2019, 05:20:53 AM by AL|EN »
Project Infinity public BETA - mod manager for Infinity Engine games
Modder's Guide to Github - you cannot have progress without committing changes

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Indeed I should be more specific. My questions are code-structure related. I'm not expecting that you will explain every line of the code but I'm sure that you can point to correct pieces of the code itself and the relations between those pieces.

- general flow of the main loop
I'm sorry, but there is no 10-20 lines about it. When you say "main loop", I assume you mean installing a mod?
Yes, from the start like reading file, parsing instructions, extracting game data, creating backup, modify it and writing weidu log. Things specific to the modification of the IE games data, like for eg: how a function is changing binary data in order to change item name, are not so important.
Even within the scope you have specified, this is a much larger request than I think you realise. As I said, there's no 10-20 lines about it (if you want something with useful granularity). If you get impatient waiting, I suggest you follow the code yourself. WeiDU always starts in Main.main (main.ml). If you are installing a mod, control rather quickly flows to Tpwork.handle_tp and after that it gets convoluted.

Quote
Quote
- backup system new logic
What are you referring to?
Recent weidu version improved the way how backup system works, please describe how it works.
You are going to have to point me to it. I don't remember anything that fits your description.

Quote
Ok, so it's GLR parser. Now, I assume that it's used to match tp2 keywords and their aliases. But how and where it is used for weidu?
It's a parser generator. The lexer (also a product of Elkhound) transforms text into grammatical tokens, which the parser tries to make sense of (essentially, trealparser.in). The Elkhound-produced parser is used for TP2, which is what allowed the bigg to introduce a less stilted grammar for TP2 (no need to quote every string, etc), compared to the LALR(1) grammar the old parser-generator required.

Offline AL|EN

  • Planewalker
  • *****
  • Posts: 391
  • Gender: Male
Even within the scope you have specified, this is a much larger request than I think you realise. As I said, there's no 10-20 lines about it (if you want something with useful granularity). If you get impatient waiting, I suggest you follow the code yourself. WeiDU always starts in Main.main (main.ml). If you are installing a mod, control rather quickly flows to Tpwork.handle_tp and after that it gets convoluted.
Thanks, that's good start. I won't get impatient so if there is anything more you can add, please do.

You are going to have to point me to it. I don't remember anything that fits your description.
Please explain how backup system works via pseudo-code or logic diagram. Does weidu monitor the files difference inside overdrive between components to get list of things which are modified? Or does every function which modify game resource is contributing to the 'backup file list'?
Project Infinity public BETA - mod manager for Infinity Engine games
Modder's Guide to Github - you cannot have progress without committing changes

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: