Day 5: Grunt work
Published: 2020-07-03 10:47:51

So I knew that this morning's job was going to be mostly typing up pre-existing ideas, not much code or thought involved. I knew it was going to be a bit of a slog. Or, I thought I knew.

Of course, it wasn't as simple as that. It's one thing to write down an idea and call it "simple", it's another thing entirely to code something "simple". 

In fairness, a lot of what I had written down was simple to code, or at least would have been if I were more familiar with the Stellaris modding language. The problem is, I don't necessarily know the names for different modifiers off the top of my head, so I end up having to do a lot of searching, and these names aren't always obvious and easy to find, if they even exist. A couple of things I wanted to add in didn't, it turns out.

On top of that, I did come across a couple of new concepts, such as the cross-creation of leader traits. Since these need to be coded differently for species pops and species leaders, there was a whole new idea I needed to learn just to add the "long-lived" trait.

![Code of traits and their localisations](https://dev-to-uploads.s3.amazonaws.com/i/0ezquslin5cgifexb0sm.jpg)

And then because I didn't want to accidentally leave any of these without in-game text, I needed to create a name and description for each one so that I'd remember to come back and add the text later. As you can see in the attached image, this means writing even more lines in yet another file for each added trait.

Finally, since I can't use my usual PC today (the home office space is being used for virtual meetings) I'm on the laptop, with no local Stellaris installation. Which means I can't just look up what's already in the game to copy from, and I can't test what I'm doing. There's been a lot of blind coding that I'll just have to test at a later date.

That said, I'm done with this week's project. I'm happy with what I've learned, and I'm certain to come back to this in my spare time, and I'll come back to more in-depth work for a future weekly project. But I'm done for now.

# What I've learned

Firstly, what I've learned is that learning a new language is fun. I mean, I already knew that, but this is actually the first time since Northcoders that I've ventured into something that isn't Javascript. Although the Paradox modding language may not be an official tech language (I don't really know the definition for what constitutes a "language" in that sense) it was definitely a different way of working with new variables and layouts, and it was enjoyable to learn the ins and outs all by myself.

I've learned that modding is not necessarily difficult, as long as you actually get on and do it. I spend too much of my time thinking about what a mod should have in it, when I should perhaps spend more time doing and less time prevaricating.

Equally I've learned that planning is as important as doing. You can't do just one or the other: working with no plan is aimless and likely to end up going nowhere. But planning with no practical experience is similarly worthless, since you don't know the tools you're working with, the limits and the potential. And of course, our best ideas come when we're working on something and inspiration for further improvements strikes.

# What's next

In yesterday's post, I mentioned that I was going to start learning PHP next week, and that's still on the cards. However, more important is transferring (or cross posting) this blog to my own portfolio site, where I can share it more easily and have more control over the content.

So next week's project is going to be setting up a blog on my portfolio site, which can function as a blog and not just a series of pages I have to code up. Over the weekend or on Monday I'm going to look into exactly what that entails, and come back with something like a plan.