R
RedFox
Hello, I'm a beginner at Visual Basic and desperately need to develop a
program to help with game developing. The idea of the program is simple - to
cross check across various files for consistency and make sure certain
conditions are met. Lines that do not check would be echoed into an error
dialog or form.
There are 3 files in which the program must check. The main file is called
'descr_strat.txt'. This file is littered with thousands of lines of code and
it must check for the following lines:
faction greek_cities,
....
unit greek levy hoplites exp 1 armour 0 weapon_lvl 1
....
First it should find a line with 'faction' and identify the faction as
'greek_cities', then the next line with 'unit' should be identified as 'greek
levy hoplites' belonging to 'greek_cities' with culture 'greek'
Once the unit is identified, the program must check another file for the
correct ownership value: export_descr_unit.txt
type greek levy hoplites
....
....
ownership greek
It should find the unit type 'greek levy hoplites' and check the next line
of ownership that comes up. This value should return as 'greek', also meaning
'greek_cities'.
There is also a third file that defines each faction's culture. Since the
ownership can be both a faction name and culture, it must check for either of
those. For example, the ownership can be "ownership greek_cities" or
"ownership roman, eastern, greek_cities". In either way, it must identify all
the values there and check if it adds up to the faction in descr_strat.txt
The culture file is pretty basic and self explanatory:
....
greek_cities=greek
romans_julii=roman
....
Now I know that this is a bit TOO complex to start with when you just
started learning Visual Basic, but we really need this program to debug the
game, since incorrect ownerships cause a crash and there are THOUSANDS of
unit lines in that file, and manual checking would take days.
The idea itself seems really basic, I just need to know how to make VB to
open those files, then search and check for the necessary data.
Regards,
- RedFox
program to help with game developing. The idea of the program is simple - to
cross check across various files for consistency and make sure certain
conditions are met. Lines that do not check would be echoed into an error
dialog or form.
There are 3 files in which the program must check. The main file is called
'descr_strat.txt'. This file is littered with thousands of lines of code and
it must check for the following lines:
faction greek_cities,
....
unit greek levy hoplites exp 1 armour 0 weapon_lvl 1
....
First it should find a line with 'faction' and identify the faction as
'greek_cities', then the next line with 'unit' should be identified as 'greek
levy hoplites' belonging to 'greek_cities' with culture 'greek'
Once the unit is identified, the program must check another file for the
correct ownership value: export_descr_unit.txt
type greek levy hoplites
....
....
ownership greek
It should find the unit type 'greek levy hoplites' and check the next line
of ownership that comes up. This value should return as 'greek', also meaning
'greek_cities'.
There is also a third file that defines each faction's culture. Since the
ownership can be both a faction name and culture, it must check for either of
those. For example, the ownership can be "ownership greek_cities" or
"ownership roman, eastern, greek_cities". In either way, it must identify all
the values there and check if it adds up to the faction in descr_strat.txt
The culture file is pretty basic and self explanatory:
....
greek_cities=greek
romans_julii=roman
....
Now I know that this is a bit TOO complex to start with when you just
started learning Visual Basic, but we really need this program to debug the
game, since incorrect ownerships cause a crash and there are THOUSANDS of
unit lines in that file, and manual checking would take days.
The idea itself seems really basic, I just need to know how to make VB to
open those files, then search and check for the necessary data.
Regards,
- RedFox