1738_Creations

I was asked to help figure out some problems with non-English Command and Conquer Generals CSF files and the original csfeditor program written back in 2002/2003. No source code was available and as it's been 18 years since the original release I doubt the problem would be fixed.

I'm not a programmer but I can do stuff so wrote a program to convert CSF to STR. Suprised that other modders didn't know how to do this, I thought I'd make a video explaining the process of how I read the file.

This isn't a programming guide. The CSF file contains basic strings used in the game, but they're in Unicode. This is how to read and decipher (not the right word...) the contents. The end goal is to output the CSF Unicode text to a literal string file (STR) for standard human reading. The STR can be read by the Generals game and is far easier to work with, however it does seem limited to standard English characters. Maybe it's to do with system or game install language? My CSF converter works in all languages and fixes all errors I found with the original csfeditor program.

I thought this was very basic stuff so I wasn't sure how to pace the video or what to explain. Hopefully it's not too condescending.

As there's a lot to read on the screen and most of it is in hex, I disabled the mouse cursor.

Tools:
- HxD
-- Any hex file reader will work, write ability is not needed
-- https://mh-nexus.de/en/hxd/

- Game files used
-- Generals and ZH CSF files
-- Project Raptor Russian CSF file
-- Original csfeditor program (not made by me)
-- https://drive.google.com/file/d/1zm5Kxoz1FdwgzasBjSMJV2I_78W-PkAv

- My CSF to STR converter
-- Program, no code
-- https://drive.google.com/file/d/1A8Rvxp69_LkOG334N8fNHTc5UkWWXUjZ

- Annotated (sort of!) code
-- Build in C# with VS 2015
-- https://drive.google.com/file/d/1Oe9nsY6iNfyiF6elELVYajwzeR4SXoCi/view?usp=sharing

Time stamps:
00:00 - 05:15 - Intro and ramblings about tools and what we want to do
05:15 - 08:55 - Inspecting the CSF and STR files in Notepad++
08:55 - 11:59 - Basic walkthrough of HxD and what we;re looking at in Hex
11:59 - 21:44 - Inspecting the data we can read
21:44 - 31:12 - Deciphering the data we can't read (Unicode values)
31:12 - 35:13 - How we iterate through all entries in the CSF
35:13 - END - A bit about why I don't want to release the code and final thoughts

Command and Conquer Generals Modding Playlist:- todo

This video covers a basic command set and button creation. It also has a very long-winded example for switchable command sets, which we use to bypass the 14 slot button limit. If you're just after a refresher on how switchable sets work, just grab the files instead of sitting through the video. There are 3 examples, each with custom mapped iamges, which aren't covered in this video. That will come in the images video!

All examples are using the USA construction dozer. The same method works for any unit.

Assets and examples used in this video:
- https://drive.google.com/open?id=17aNaKr9-s0aAXxIewn_rjWWgb34py5gC

As always, most of this should work for Generals as well as Zero Hour. Use Zero Hour when you can, it adds a lot of fun and more assets to play with.

Downloads:
# Assets for this video, same as link above:
-- https://drive.google.com/open?id=17aNaKr9-s0aAXxIewn_rjWWgb34py5gC

Timestamps:
00:00 - 01:00
-- General info

00:01 - 03:34
-- Modifying an existing command set

03:34 - 07:13
-- Creating a new command set

07:13 - 16:18
-- Creating a new button and adding it to a command set

16:18 - 39:36
-- Creating a multi-page, switchable command set

39:36 - 41:00
-- Fixing multi-page buttons occasionally not firing

41:00 - 41:57
-- Removing pings and notifications when switching command set pages

41:57 - End
-- A bit more info

Forgot to turn on the game audio for this so it's even quiter than normal. Although I do have ordered a microphone! The chances of me using it are rather low though...

This video covers the creation and modding of text strings. Generals holds all text strings in a '.csf' file. Some may be baked in to images, but the majority are in this file. The CSF requires a specific program to edit, however the CSF can be converted to an STR which can be modded with any text editor. We'll mostly concentrate on STR files as they're easier to work with.

The CSF/STR file must contain all text strings in the game, not simply the ones we want to mod or add. The CSF editor program, required for CSF and STR files, actually cuts off a few strings. It's unfortunate but the only tool available.

As always, most of this should work for Generals as well as Zero Hour. Use Zero Hour when you can, it adds a lot of fun and more assets to play with.

Downloads:
# CSF and STR setup can be found in the tools video:
-- https://youtu.be/4VlQnJurfME

Timestamps:
00:00 - 02:10
-- General information and skippable stuff

02:10 - 06:06
-- CSF file with main menu example (modded)

06:06 - 08:38
-- STR file with main menu example (modded)

08:38 - 13:34
-- STR file with command button example (modded)

13:34 - 16:20
-- STR file with unit name example (modded)

16:20 - 18:31
-- STR file with unit name example (new string)

18:31 - 19:08
-- STR file with upgrades

19:08 - 20:30
-- STR file with super powers

20:30 - End
-- Errors and text modifier notes

This is the first of the reboot videos which has taken surprisingly long to make.

Command and Conquer Generals Modding Playlist:
- todo!

This video covers the setup of tools required for modding Command & Conquer Generals/Zero Hour. Zero Hour adds a few more moddable features and units so all the videos are from a Zero Hour perspective. However, most of this should also work with the base Generals game.

Downloads:
# CSF Editor (executable)
-- https://drive.google.com/open?id=1ERqjj3U2EATSfb05GzrLSgMGg8axl8hv

# CSF Formatter (executable)
-- https://drive.google.com/open?id=1N70Z8otjSHXGZja9LIqPjxp5iPMKTA4n

# CSF Formatter (Ruby script)
-- https://drive.google.com/open?id=1ExQrVOKlVUN5XZywMry7Rcktj4ImifOQ

# CSF text file for direct editing
-- https://drive.google.com/open?id=1amtuaMC40PvJjZnnStEGqi1MD6vdphvX

# DDS Plug-ins
-- https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop

# FinalBig
-- https://drive.google.com/open?id=1orSPOosKtI3w68mXV2noraaUeSKFzNUB

# GMax download link (register for free key)
-- https://www.turbosquid.com/gmax

# Renegade Tools Installer
-- https://drive.google.com/open?id=1LpADwErXdLs158tVhag4_N4Y6S4D9u5S

# W3D Importer script
-- https://drive.google.com/open?id=1ebwczJAbseQd4zsb5otoiS36b-BW496k

# W3D Importer script (with animations - coolfile)
-- https://drive.google.com/open?id=1fuNGPnDRgvI7ZU2X4dHh5QOopKercJ36

Timestamps:
00:00 - 02:47
-- General information and skippable stuff.

02:47 - 10:01
-- FinalBig with INI and general file layouts.

10:01 - 16:32
-- Making the game boot faster. Shortcut switches and deleting movies.

16:32 - 19:09
-- DDS textures.

19:09 - 26:39
-- GMax, RenX and W3D models.

26:39 - 36:11
-- CSEditor and adding text to the game (UI, unit names, menus...).

36:11 - end
-- Talking nonsense and finishing up.

Installing and running a Quake 3 dedicated server on a Raspberry Pi. Skip to the bottom for timestamps and resources. I'm using "ioquake3" as a server since it's incredibly simple to set up.

The server is running with around 19 bots, who gradually join and increase resources. I also join in from a test machine to show what actual game play feels like. While playing I'll show system resource stats and core temp of the Pi.

The server is 'ioquake3', which is a single command to install. You'll then need to copy some files over before using the single line launch command. I try a LAN and Internet server, highlighting any differences between the 2.

My Equipment / Prerequisites:
=========================
- Pi Model 4
-- With 64GB class 10 SD card.
-- Using ethernet.
-- I have the 4GB version, which seems overkill for this server. Even if running mods or larger levels, it's doubtful you'll get anywhere near 4GB.
-- The CPU takes a hit when running a lot of bots. Will likely be a lot less with human players.
- I have a small fan on my Pi 4 which I took off my old Pi 3. There's no mount so I just taped it on. it doesn't make a big difference to core temp, but it's better than nothing.
- Raspbian Buster with desktop (10/07/2019)

- Desktop PC
-- i7-5820K, 16GB DDR4, NVIDIA 1060 6GB, mechanical drives.
-- For installing Quake 3 to play and rip files.

- Copy of Quake 3
-- To join the server once running.
-- To pull out pak files to copy on to server.
-- I'm using the Steam version, which is missing pak files. See resources section.

- USB memory stick (optional)
-- For copying files to the Pi, but you can use any method (ftp, samba...).

Resources:
=========
- Config files and core temp script:
-- https://drive.google.com/open?id=1G4GfwPfZBtzQMIJOZde8L3uOamGF7R8v

- Quake 3 patch data.
-- The Steam version is missing some pak files which supposedly come from a patch. The server won't launch without them but you can get them from the official ioquake3 page
-- https://ioquake3.org/extras/patch-data/

Timestamps:
===========
00:00 - 00:22.... Intro
00:22 - 06:35... Copying files on to usb with desktop PC
06:35 - 07:37... Updating Raspbian (new install of OS)
07:37 - 10:27... Installing server
10:27 - 11:21... Setting up resource and temperature monitoring
11:21 - 14:21... Launching Quake 3 Arena LAN server
14:21 - 16:13...Launching Quake 3 Team Arena LAN server
16:13 - 20:43...Launching Quake 3 Team Arena Internet server
20:43 - end ...Summary

Installing and running a Windward dedicated server on a Raspberry Pi. Skip to the bottom for timestamps and resources. The server is incredibly easy to install; install mono, download server, extract server and run.

According to the documentation it should be that easy, but they forgot something! I tried following all the guides which got my server running, but when I joined I couldn't start the world. Took me a while to figure out that you need to log in as an admin player first so you get can set world options. The video demonstrates the non-admin issue and the resolution, in case others have had this annoyance.

Server installation takes almost no time or configuration once 'the problem' is addressed. Server resources used are minimal throughout. They're so low that every generation of the Pi should be able to run the server to some degree.

My Equipment / Prerequisites:
=============================
- Pi Model 4
-- With 64GB class 10 SD card (U1)
-- Using ethernet.
-- I have the 4GB version
- I have a small fan on my Pi 4 which I took off my old Pi 3. There's no mount so I just taped it on. it doesn't make a big difference to core temp, but it's better than nothing.
- Raspbian Buster with desktop (10/07/2019)

- Desktop PC
-- i7-5820K, 16GB DDR4, NVIDIA 1060 6GB, mechanical drives.
-- For installing Terraria and testing server.

- Copy of Windward
-- To join the server once running.

Resources:
=========
- Windward server
-- http://www.tasharen.com/windward/WWServer.zip
- Windward documentation
-- https://windward.gamepedia.com/Dedicated_Server
- That Python temperature script
-- https://drive.google.com/open?id=1qtmqnFUZpam9s7H3Stk5R4TsSulbmLZl

Timestamps:
===========
00:00 - 00:45.... Intro
00:45 - 03:01... Server installation
03:01 - 07:41... Running a server which can be joined but won't launch
07:41 - 11:07... Fixed the server and rejoined
11:07 - 12:55... Playing and resource monitoring
12:55 - end... Playing a large world

Can the might Pi handle an Open Transport Tycoon Deluxe dedicated server? Yes. Easily. Even a Pi 2 should be able to handle it. Give it a go.

Raspberry Pi 4 dedicated server playlist:
https://www.youtube.com/playlist?list=PLoKC73clba2Kn_eRi3V0SrYcTXQIdOnWM

i didn't think it was my kind of game, but it grows on you. Probably a good idea to read up on the game first if you've never played before. I've grown quite attached to it after a couple of hours making this video. CPU usage was minimal with 5 AI players and RAM barely rose by 20MB after over an hour of playing.

Thanks to Yougotnomilk for pointing out why you should take time to make the description match the video!

My Equipment / Prerequisites:
=============================
- Pi Model 4
-- With 64GB class 10 SD card (U3)
-- Using ethernet.
-- I have the 4GB version but this should work with any
- I have a small fan on my Pi 4 which I took off my old Pi 3. There's no mount so I just taped it on. it doesn't make a big difference to core temp, but it's better than nothing.
- Raspbian Buster with desktop (updated from 10/07/2019)

- Desktop PC
-- i7-5820K, 16GB DDR4, NVIDIA 1060 6GB, mechanical drives.
-- For installing OpenTTD client and testing server.

Resources:
=========
- AI Downloads
-- https://bananas.openttd.org/en/ai/

- OpenTTD
-- https://www.openttd.org/downloads/openttd-releases/latest.html
--- Select a 'Windows' release from the 'Download stable' section to the bottom of the page
--- Select a 'source' download from the 'Download stable' section to the bottom of the page
--- Client (Windows) and server (source) version numbers must match

- OpenGFX (graphcis)
-- https://www.openttd.org/downloads/opengfx-releases/latest.html

- OpenSFX (audio)
-- https://www.openttd.org/downloads/opensfx-releases/latest.html

- OpenMSX (music)
-- https://www.openttd.org/downloads/openmsx-releases/latest.html

- That Python temperature script
-- https://drive.google.com/open?id=1qtmqnFUZpam9s7H3Stk5R4TsSulbmLZl

Pi Building Prerequisites:
=====================

build-essential pkg-config libsdl1.2-dev subversion patch zlib1g-dev liblzo2-dev liblzma-dev libfontconfig-dev libicu-dev

Timestamps:
===========
00:00 - 04:46
- Installing the client

04:46 - 11:18
- Installing and compiling the server

11:18 - 14:37
- Installing server asset packs and AI

14:37 - 17:52
- Running the server and adding AI

17:52 - 20:23
- Saving and loading with the server

20:23 - end
- Playing for an hour and watching resources

Installing and running a Terraria dedicated server on a Raspberry Pi. Skip to the bottom for timestamps and resources. I'm using "TShock" which is so simple it doesn't require a video, so the majority of this is covering world generation times and performance. The official desktop and mobile servers won't work on a Pi as they require an x86 CPU.

The installation is incredibly quick and simple. It doesn't really need a video. In this video I compare small/large world generation between the Pi and a PC. No shock as to which wins. Then I "play" each level for a while to monitor resource usage.

TShock runs at 200% CPU usage when performing complex tasks. This implies it's only using 2 of the 4 Pi cores available, which means it's never going to overheat. Obviously that means a lot of CPU power is never used which impacts large world generation. Without looking at the code, it's not apparent whether this is due to TShock or the Mono framework. I'd edging towards TShock as the PC version seems to use a few more threads (mine has 12) although not to their fullest. This may be due to hardware limitations as I'm running mechanical drives.

In case it doesn't come through in the video, I hate these games. This one in particular due to its appalling UI. It's a terrible waste of time which could be better spent playing a real game with a story and character development. Or reading a book, if such a thing were possible!

Pi TShock world locations:
- Running as su: '/home/[user]/.local/share/Terraria/Worlds/'
- Running as local user: '/local/share/Terraria/Worlds/'

Windows PC world location:
- c:\users\[username]\Documents\My Games\Terraria\Worlds\

My Equipment / Prerequisites:
=============================
- Pi Model 4
-- With 64GB class 10 SD card (U1)
-- Using ethernet.
-- I have the 4GB version. From server performance, the 1GB may have issues.
- I have a small fan on my Pi 4 which I took off my old Pi 3. There's no mount so I just taped it on. it doesn't make a big difference to core temp, but it's better than nothing.
- Raspbian Buster with desktop (10/07/2019)

- Desktop PC
-- i7-5820K, 16GB DDR4, NVIDIA 1060 6GB, mechanical drives.
-- For installing Terraria and testing server.

- Copy of Terraria
-- To join the server once running.
-- Can't recommend it.

- USB memory stick (optional)
-- If you wanted to copy the files from a computer, but you can easily download from the website on a Pi

Resources:
=========
- TShock server
-- https://github.com/Pryaxis/TShock/releases/
- That Python temperature script
-- https://drive.google.com/open?id=1qtmqnFUZpam9s7H3Stk5R4TsSulbmLZl

Timestamps:
===========
00:00 - 00:17.... Intro
00:17 - 02:59... Installing server on the pi
02:59 - 03:55... Talking about pi monitoring tools for video
03:55 - 06:12... Generating small world on Pi
06:12 - 07:18... Generating small world on PC
07:18 - 08:53...Generating large world on Pi
08:53 - 09:47... Generating large world on PC
09:47 - 11:00... Summary of world generation times
11:00 - 15:03... Playing a small world
15:03 - end... Playing a large world

SHOW MORE

Created 1 year, 3 months ago.

8 videos

Category None